From 2e955f51b9fa4a3ac9275dfbe007f252eefba1ae Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 1 Apr 2023 14:53:45 +0200 Subject: [PATCH] fix lack of suggestions in flow editor --- frontend/Caddyfile | 1 + frontend/package-lock.json | 156 +- frontend/package.json | 9 +- frontend/src/lib/components/Editor.svelte | 17 +- .../src/lib/components/FlowBuilder.svelte | 2 +- .../components/common/drawer/Drawer.svelte | 4 +- .../flows/content/FlowModuleComponent.svelte | 54 +- frontend/src/lib/editorUtils.ts | 265 +- .../(root)/(logged)/flows/add/+page.svelte | 2 + .../flows/edit/[...path]/+page.svelte | 2 + frontend/static/workers/cssWorker-es.js | 48404 ++-- frontend/static/workers/cssWorker-iife.js | 14 +- frontend/static/workers/editorWorker-es.js | 9906 +- frontend/static/workers/editorWorker-iife.js | 6 +- frontend/static/workers/htmlWorker-es.js | 26934 +- frontend/static/workers/htmlWorker-iife.js | 32 +- frontend/static/workers/jsonWorker-es.js | 19523 +- frontend/static/workers/jsonWorker-iife.js | 12 +- frontend/static/workers/tsWorker-es.js | 202493 ++++++--------- frontend/static/workers/tsWorker-iife.js | 50 +- 20 files changed, 126171 insertions(+), 181715 deletions(-) diff --git a/frontend/Caddyfile b/frontend/Caddyfile index d18bc1c756..2a8fe38ca3 100644 --- a/frontend/Caddyfile +++ b/frontend/Caddyfile @@ -2,6 +2,7 @@ http://localhost { bind {$ADDRESS} reverse_proxy /api/* http://localhost:8000 reverse_proxy /* http://localhost:3000 + reverse_proxy /ws/* http://localhost:3001 } https://localhost { diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 224cdd2947..834d397333 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -25,14 +25,15 @@ "highlight.js": "^11.7.0", "lodash": "^4.17.21", "lucide-svelte": "^0.115.0", - "monaco-editor": "0.33.0", - "monaco-languageclient": "2.1.0", + "monaco-editor": "0.34.1", + "monaco-languageclient": "5.0.0-next.3", "svelte-autosize": "^1.0.1", "svelte-chartjs": "^3.1.0", "svelte-portal": "^2.2.0", "svelte-select": "^5.3.1", "tailwind-merge": "^1.9.1", - "vscode-ws-jsonrpc": "^2.0.1" + "vscode-languageclient": "~8.0.2", + "vscode-ws-jsonrpc": "3.0.0-next.1" }, "devDependencies": { "@playwright/test": "^1.31.1", @@ -55,7 +56,7 @@ "eslint": "^8.28.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-svelte3": "^4.0.0", - "monaco-editor-workers": "0.33.0", + "monaco-editor-workers": "0.34.2", "ol": "^7.2.2", "openapi-typescript-codegen": "^0.23.0", "path-browserify": "^1.0.1", @@ -3291,11 +3292,6 @@ "node": ">= 6" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" - }, "node_modules/global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -4238,30 +4234,30 @@ } }, "node_modules/monaco-editor": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.33.0.tgz", - "integrity": "sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw==" + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.34.1.tgz", + "integrity": "sha512-FKc80TyiMaruhJKKPz5SpJPIjL+dflGvz4CpuThaPMc94AyN7SeC9HQ8hrvaxX7EyHdJcUY5i4D0gNyJj1vSZQ==" }, "node_modules/monaco-editor-workers": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.33.0.tgz", - "integrity": "sha512-KrIju+r4mKCzGi9kDVqUIze78EilSf8VbvNOQD7p14LSVah5fy1Z3z5QRYDDgHcHFEkzT7vbVMRnBRy6CI/aHQ==", - "dev": true, - "dependencies": { - "monaco-editor": "0.33.0" - } + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.34.2.tgz", + "integrity": "sha512-MdO1nvAbGNzc7ygyzwACvs5DOPaTOUNDjU/qTQx0Rsw00BrhL88eMi9sWBm+LYfQbPaZf+YBqwJaJUovl3M6bQ==", + "dev": true }, "node_modules/monaco-languageclient": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-2.1.0.tgz", - "integrity": "sha512-Ps+G97MH8p/T7dk7NqJnDgub6x2+SiAmFR6rjUyJ2qdSGUNgg310bPD521rEPUTNKGfP7VwBggFjcnoGGCi0vg==", + "version": "5.0.0-next.3", + "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-5.0.0-next.3.tgz", + "integrity": "sha512-WX5mwntWdR74z1Y5EPFLBZGRUJ+3PhFTeoaszMfIHlpeWaTrdabz1zjAj/zlZKPkDv+CWLhn+VYrfPlGd5mwZA==", "dependencies": { - "glob-to-regexp": "0.4.1", - "vscode": "npm:@codingame/monaco-vscode-api@~1.67.20", "vscode-jsonrpc": "8.0.2", - "vscode-languageclient": "8.0.2", - "vscode-languageserver-textdocument": "1.0.5", - "vscode-uri": "3.0.3" + "vscode-languageclient": "8.0.2" + }, + "engines": { + "node": ">=16.11.0", + "npm": ">=9.0.0" + }, + "peerDependencies": { + "vscode": "npm:@codingame/monaco-vscode-api@~1.69.0" } }, "node_modules/mri": { @@ -7111,11 +7107,14 @@ }, "node_modules/vscode": { "name": "@codingame/monaco-vscode-api", - "version": "1.67.20", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.67.20.tgz", - "integrity": "sha512-3+swJLtpNWmn2hsnVFv/qbLuQLt+FlaDLgcK0PgYwWVIJn2FjO48a0+ke8ZYS/tiqZxJgJSk+y6hdohgZo7n0g==", - "dependencies": { - "monaco-editor": "^0.33.0" + "version": "1.69.24", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.69.24.tgz", + "integrity": "sha512-D105o8lg/sKUAjQKOlDlEvmnnfUpB/3cBr37ZpF5cFQrHqnJ/0XwWsk2iET36brrdjsk67l0Uctik98in8BzxA==", + "peer": true, + "peerDependencies": { + "monaco-editor": "~0.34.0", + "vscode-oniguruma": "^1.6.2", + "vscode-textmate": "^7.0.1" } }, "node_modules/vscode-jsonrpc": { @@ -7153,20 +7152,22 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz", - "integrity": "sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg==" + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "peer": true }, - "node_modules/vscode-uri": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.3.tgz", - "integrity": "sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==" + "node_modules/vscode-textmate": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-7.0.4.tgz", + "integrity": "sha512-9hJp0xL7HW1Q5OgGe03NACo7yiCTMEk3WU/rtKXUbncLtdg6rVVNJnHwD88UhbIYU2KoxY0Dih0x+kIsmUKn2A==", + "peer": true }, "node_modules/vscode-ws-jsonrpc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/vscode-ws-jsonrpc/-/vscode-ws-jsonrpc-2.0.2.tgz", - "integrity": "sha512-gIOGdaWwKYwwqohgeRC8AtqqHSNghK8wA3oVcBi7UMAdZnRSAf8n4/Svtd+JHqGiIguYdNa/sC0s4IW3ZDF7mA==", + "version": "3.0.0-next.1", + "resolved": "https://registry.npmjs.org/vscode-ws-jsonrpc/-/vscode-ws-jsonrpc-3.0.0-next.1.tgz", + "integrity": "sha512-9Snn23NgLKRO+LDuNcF+0mYIjgsDFXXinLQNP/unPXzaE6YO6eaO2uyf88HHg3M9wyQf/bArO67sYhsBFdC3Ow==", "dependencies": { "vscode-jsonrpc": "8.0.2" }, @@ -9626,11 +9627,6 @@ "is-glob": "^4.0.1" } }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" - }, "global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", @@ -10345,30 +10341,23 @@ } }, "monaco-editor": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.33.0.tgz", - "integrity": "sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw==" + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.34.1.tgz", + "integrity": "sha512-FKc80TyiMaruhJKKPz5SpJPIjL+dflGvz4CpuThaPMc94AyN7SeC9HQ8hrvaxX7EyHdJcUY5i4D0gNyJj1vSZQ==" }, "monaco-editor-workers": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.33.0.tgz", - "integrity": "sha512-KrIju+r4mKCzGi9kDVqUIze78EilSf8VbvNOQD7p14LSVah5fy1Z3z5QRYDDgHcHFEkzT7vbVMRnBRy6CI/aHQ==", - "dev": true, - "requires": { - "monaco-editor": "0.33.0" - } + "version": "0.34.2", + "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.34.2.tgz", + "integrity": "sha512-MdO1nvAbGNzc7ygyzwACvs5DOPaTOUNDjU/qTQx0Rsw00BrhL88eMi9sWBm+LYfQbPaZf+YBqwJaJUovl3M6bQ==", + "dev": true }, "monaco-languageclient": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-2.1.0.tgz", - "integrity": "sha512-Ps+G97MH8p/T7dk7NqJnDgub6x2+SiAmFR6rjUyJ2qdSGUNgg310bPD521rEPUTNKGfP7VwBggFjcnoGGCi0vg==", + "version": "5.0.0-next.3", + "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-5.0.0-next.3.tgz", + "integrity": "sha512-WX5mwntWdR74z1Y5EPFLBZGRUJ+3PhFTeoaszMfIHlpeWaTrdabz1zjAj/zlZKPkDv+CWLhn+VYrfPlGd5mwZA==", "requires": { - "glob-to-regexp": "0.4.1", - "vscode": "npm:@codingame/monaco-vscode-api@~1.67.20", "vscode-jsonrpc": "8.0.2", - "vscode-languageclient": "8.0.2", - "vscode-languageserver-textdocument": "1.0.5", - "vscode-uri": "3.0.3" + "vscode-languageclient": "8.0.2" } }, "mri": { @@ -12353,12 +12342,11 @@ "requires": {} }, "vscode": { - "version": "npm:@codingame/monaco-vscode-api@1.67.20", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.67.20.tgz", - "integrity": "sha512-3+swJLtpNWmn2hsnVFv/qbLuQLt+FlaDLgcK0PgYwWVIJn2FjO48a0+ke8ZYS/tiqZxJgJSk+y6hdohgZo7n0g==", - "requires": { - "monaco-editor": "^0.33.0" - } + "version": "npm:@codingame/monaco-vscode-api@1.69.24", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.69.24.tgz", + "integrity": "sha512-D105o8lg/sKUAjQKOlDlEvmnnfUpB/3cBr37ZpF5cFQrHqnJ/0XwWsk2iET36brrdjsk67l0Uctik98in8BzxA==", + "peer": true, + "requires": {} }, "vscode-jsonrpc": { "version": "8.0.2", @@ -12391,20 +12379,22 @@ } } }, - "vscode-languageserver-textdocument": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz", - "integrity": "sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg==" + "vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "peer": true }, - "vscode-uri": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.3.tgz", - "integrity": "sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==" + "vscode-textmate": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-7.0.4.tgz", + "integrity": "sha512-9hJp0xL7HW1Q5OgGe03NACo7yiCTMEk3WU/rtKXUbncLtdg6rVVNJnHwD88UhbIYU2KoxY0Dih0x+kIsmUKn2A==", + "peer": true }, "vscode-ws-jsonrpc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/vscode-ws-jsonrpc/-/vscode-ws-jsonrpc-2.0.2.tgz", - "integrity": "sha512-gIOGdaWwKYwwqohgeRC8AtqqHSNghK8wA3oVcBi7UMAdZnRSAf8n4/Svtd+JHqGiIguYdNa/sC0s4IW3ZDF7mA==", + "version": "3.0.0-next.1", + "resolved": "https://registry.npmjs.org/vscode-ws-jsonrpc/-/vscode-ws-jsonrpc-3.0.0-next.1.tgz", + "integrity": "sha512-9Snn23NgLKRO+LDuNcF+0mYIjgsDFXXinLQNP/unPXzaE6YO6eaO2uyf88HHg3M9wyQf/bArO67sYhsBFdC3Ow==", "requires": { "vscode-jsonrpc": "8.0.2" } diff --git a/frontend/package.json b/frontend/package.json index 411c2bdf40..ca57d83157 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,7 +36,7 @@ "eslint-config-prettier": "^8.6.0", "eslint-plugin-svelte3": "^4.0.0", "ol": "^7.2.2", - "monaco-editor-workers": "0.33.0", + "monaco-editor-workers": "0.34.2", "openapi-typescript-codegen": "^0.23.0", "path-browserify": "^1.0.1", "pdfjs-dist": "^3.4.120", @@ -83,14 +83,15 @@ "highlight.js": "^11.7.0", "lodash": "^4.17.21", "lucide-svelte": "^0.115.0", - "monaco-editor": "0.33.0", - "monaco-languageclient": "2.1.0", + "monaco-editor": "0.34.1", + "monaco-languageclient": "5.0.0-next.3", + "vscode-languageclient": "~8.0.2", "svelte-autosize": "^1.0.1", "svelte-chartjs": "^3.1.0", "svelte-portal": "^2.2.0", "svelte-select": "^5.3.1", "tailwind-merge": "^1.9.1", - "vscode-ws-jsonrpc": "^2.0.1" + "vscode-ws-jsonrpc": "3.0.0-next.1" }, "peerDependencies": { "svelte": "^3.55.1" diff --git a/frontend/src/lib/components/Editor.svelte b/frontend/src/lib/components/Editor.svelte index 70d58dcf51..beb25f0949 100644 --- a/frontend/src/lib/components/Editor.svelte +++ b/frontend/src/lib/components/Editor.svelte @@ -1,10 +1,12 @@ +
+ diff --git a/frontend/src/routes/(root)/(logged)/flows/edit/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/flows/edit/[...path]/+page.svelte index 1d5944a4e2..0a19a17870 100644 --- a/frontend/src/routes/(root)/(logged)/flows/edit/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/flows/edit/[...path]/+page.svelte @@ -62,6 +62,8 @@ } +
+ key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; -class ErrorHandler { +var Po = Object.defineProperty; +var Io = (e, t, n) => t in e ? Po(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; +var zt = (e, t, n) => (Io(e, typeof t != "symbol" ? t + "" : t, n), n); +class Lo { constructor() { - this.listeners = []; - this.unexpectedErrorHandler = function(e) { + this.listeners = [], this.unexpectedErrorHandler = function(t) { setTimeout(() => { - if (e.stack) { - throw new Error(e.message + "\n\n" + e.stack); - } - throw e; + throw t.stack ? new Error(t.message + ` + +` + t.stack) : t; }, 0); }; } - emit(e) { - this.listeners.forEach((listener) => { - listener(e); + emit(t) { + this.listeners.forEach((n) => { + n(t); }); } - onUnexpectedError(e) { - this.unexpectedErrorHandler(e); - this.emit(e); + onUnexpectedError(t) { + this.unexpectedErrorHandler(t), this.emit(t); } - onUnexpectedExternalError(e) { - this.unexpectedErrorHandler(e); + onUnexpectedExternalError(t) { + this.unexpectedErrorHandler(t); } } -const errorHandler = new ErrorHandler(); -function onUnexpectedError(e) { - if (!isCancellationError(e)) { - errorHandler.onUnexpectedError(e); - } - return void 0; +const To = new Lo(); +function Wo(e) { + Oo(e) || To.onUnexpectedError(e); } -function transformErrorForSerialization(error) { - if (error instanceof Error) { - let { name, message } = error; - const stack = error.stacktrace || error.stack; +function wi(e) { + if (e instanceof Error) { + let { name: t, message: n } = e; + const r = e.stacktrace || e.stack; return { - $isError: true, - name, - message, - stack + $isError: !0, + name: t, + message: n, + stack: r }; } - return error; + return e; } -const canceledName = "Canceled"; -function isCancellationError(error) { - if (error instanceof CancellationError) { - return true; - } - return error instanceof Error && error.name === canceledName && error.message === canceledName; +const or = "Canceled"; +function Oo(e) { + return e instanceof Vo ? !0 : e instanceof Error && e.name === or && e.message === or; } -class CancellationError extends Error { +class Vo extends Error { constructor() { - super(canceledName); - this.name = this.message; + super(or), this.name = this.message; } } -function once(fn) { - const _this = this; - let didCall = false; - let result; +function Uo(e) { + const t = this; + let n = !1, r; return function() { - if (didCall) { - return result; - } - didCall = true; - result = fn.apply(_this, arguments); - return result; + return n || (n = !0, r = e.apply(t, arguments)), r; }; } -var Iterable; -(function(Iterable2) { - function is(thing) { - return thing && typeof thing === "object" && typeof thing[Symbol.iterator] === "function"; +var lr; +(function(e) { + function t(C) { + return C && typeof C == "object" && typeof C[Symbol.iterator] == "function"; } - Iterable2.is = is; - const _empty2 = Object.freeze([]); - function empty() { - return _empty2; + e.is = t; + const n = Object.freeze([]); + function r() { + return n; } - Iterable2.empty = empty; - function* single(element) { - yield element; + e.empty = r; + function* i(C) { + yield C; } - Iterable2.single = single; - function from(iterable) { - return iterable || _empty2; + e.single = i; + function a(C) { + return C || n; } - Iterable2.from = from; - function isEmpty(iterable) { - return !iterable || iterable[Symbol.iterator]().next().done === true; + e.from = a; + function o(C) { + return !C || C[Symbol.iterator]().next().done === !0; } - Iterable2.isEmpty = isEmpty; - function first(iterable) { - return iterable[Symbol.iterator]().next().value; + e.isEmpty = o; + function l(C) { + return C[Symbol.iterator]().next().value; } - Iterable2.first = first; - function some(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - return true; - } + e.first = l; + function h(C, R) { + for (const k of C) + if (R(k)) + return !0; + return !1; + } + e.some = h; + function c(C, R) { + for (const k of C) + if (R(k)) + return k; + } + e.find = c; + function* d(C, R) { + for (const k of C) + R(k) && (yield k); + } + e.filter = d; + function* p(C, R) { + let k = 0; + for (const F of C) + yield R(F, k++); + } + e.map = p; + function* f(...C) { + for (const R of C) + for (const k of R) + yield k; + } + e.concat = f; + function* g(C) { + for (const R of C) + for (const k of R) + yield k; + } + e.concatNested = g; + function w(C, R, k) { + let F = k; + for (const P of C) + F = R(F, P); + return F; + } + e.reduce = w; + function* b(C, R, k = C.length) { + for (R < 0 && (R += C.length), k < 0 ? k += C.length : k > C.length && (k = C.length); R < k; R++) + yield C[R]; + } + e.slice = b; + function y(C, R = Number.POSITIVE_INFINITY) { + const k = []; + if (R === 0) + return [k, C]; + const F = C[Symbol.iterator](); + for (let P = 0; P < R; P++) { + const N = F.next(); + if (N.done) + return [k, e.empty()]; + k.push(N.value); } - return false; - } - Iterable2.some = some; - function find(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - return element; - } - } - return void 0; - } - Iterable2.find = find; - function* filter(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - yield element; - } - } - } - Iterable2.filter = filter; - function* map(iterable, fn) { - let index = 0; - for (const element of iterable) { - yield fn(element, index++); - } - } - Iterable2.map = map; - function* concat(...iterables) { - for (const iterable of iterables) { - for (const element of iterable) { - yield element; - } - } - } - Iterable2.concat = concat; - function* concatNested(iterables) { - for (const iterable of iterables) { - for (const element of iterable) { - yield element; - } - } - } - Iterable2.concatNested = concatNested; - function reduce(iterable, reducer, initialValue) { - let value = initialValue; - for (const element of iterable) { - value = reducer(value, element); - } - return value; - } - Iterable2.reduce = reduce; - function* slice(arr, from2, to = arr.length) { - if (from2 < 0) { - from2 += arr.length; - } - if (to < 0) { - to += arr.length; - } else if (to > arr.length) { - to = arr.length; - } - for (; from2 < to; from2++) { - yield arr[from2]; - } - } - Iterable2.slice = slice; - function consume(iterable, atMost = Number.POSITIVE_INFINITY) { - const consumed = []; - if (atMost === 0) { - return [consumed, iterable]; - } - const iterator = iterable[Symbol.iterator](); - for (let i = 0; i < atMost; i++) { - const next = iterator.next(); - if (next.done) { - return [consumed, Iterable2.empty()]; - } - consumed.push(next.value); - } - return [consumed, { [Symbol.iterator]() { - return iterator; + return [k, { [Symbol.iterator]() { + return F; } }]; } - Iterable2.consume = consume; - function equals(a2, b, comparator = (at, bt) => at === bt) { - const ai = a2[Symbol.iterator](); - const bi = b[Symbol.iterator](); - while (true) { - const an = ai.next(); - const bn = bi.next(); - if (an.done !== bn.done) { - return false; - } else if (an.done) { - return true; - } else if (!comparator(an.value, bn.value)) { - return false; - } + e.consume = y; + function A(C, R, k = (F, P) => F === P) { + const F = C[Symbol.iterator](), P = R[Symbol.iterator](); + for (; ; ) { + const N = F.next(), z = P.next(); + if (N.done !== z.done) + return !1; + if (N.done) + return !0; + if (!k(N.value, z.value)) + return !1; } } - Iterable2.equals = equals; -})(Iterable || (Iterable = {})); -function trackDisposable(x) { - return x; -} -function setParentOfDisposable(child, parent) { -} -class MultiDisposeError extends Error { - constructor(errors) { - super(`Encountered errors while disposing of store. Errors: [${errors.join(", ")}]`); - this.errors = errors; + e.equals = A; +})(lr || (lr = {})); +class Bo extends Error { + constructor(t) { + super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`), this.errors = t; } } -function dispose(arg) { - if (Iterable.is(arg)) { - let errors = []; - for (const d of arg) { - if (d) { +function js(e) { + if (lr.is(e)) { + let t = []; + for (const n of e) + if (n) try { - d.dispose(); - } catch (e) { - errors.push(e); + n.dispose(); + } catch (r) { + t.push(r); } - } - } - if (errors.length === 1) { - throw errors[0]; - } else if (errors.length > 1) { - throw new MultiDisposeError(errors); - } - return Array.isArray(arg) ? [] : arg; - } else if (arg) { - arg.dispose(); - return arg; - } + if (t.length === 1) + throw t[0]; + if (t.length > 1) + throw new Bo(t); + return Array.isArray(e) ? [] : e; + } else if (e) + return e.dispose(), e; } -function combinedDisposable(...disposables) { - const parent = toDisposable(() => dispose(disposables)); - return parent; +function jo(...e) { + return wn(() => js(e)); } -function toDisposable(fn) { - const self2 = trackDisposable({ - dispose: once(() => { - fn(); +function wn(e) { + return { + dispose: Uo(() => { + e(); }) - }); - return self2; + }; } -class DisposableStore { +class At { constructor() { - this._toDispose = /* @__PURE__ */ new Set(); - this._isDisposed = false; + this._toDispose = /* @__PURE__ */ new Set(), this._isDisposed = !1; } dispose() { - if (this._isDisposed) { - return; - } - this._isDisposed = true; - this.clear(); + this._isDisposed || (this._isDisposed = !0, this.clear()); } get isDisposed() { return this._isDisposed; } clear() { try { - dispose(this._toDispose.values()); + js(this._toDispose.values()); } finally { this._toDispose.clear(); } } - add(o) { - if (!o) { - return o; - } - if (o === this) { + add(t) { + if (!t) + return t; + if (t === this) throw new Error("Cannot register a disposable on itself!"); - } - if (this._isDisposed) { - if (!DisposableStore.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); - } - } else { - this._toDispose.add(o); - } - return o; + return this._isDisposed ? At.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(t), t; } } -DisposableStore.DISABLE_DISPOSED_WARNING = false; -class Disposable { +At.DISABLE_DISPOSED_WARNING = !1; +class Xr { constructor() { - this._store = new DisposableStore(); - setParentOfDisposable(this._store); + this._store = new At(), this._store; } dispose() { this._store.dispose(); } - _register(o) { - if (o === this) { + _register(t) { + if (t === this) throw new Error("Cannot register a disposable on itself!"); - } - return this._store.add(o); + return this._store.add(t); } } -Disposable.None = Object.freeze({ dispose() { +Xr.None = Object.freeze({ dispose() { } }); -class SafeDisposable { +class qo { constructor() { this.dispose = () => { - }; - this.unset = () => { - }; - this.isset = () => false; + }, this.unset = () => { + }, this.isset = () => !1; } - set(fn) { - let callback = fn; - this.unset = () => callback = void 0; - this.isset = () => callback !== void 0; - this.dispose = () => { - if (callback) { - callback(); - callback = void 0; - } - }; - return this; + set(t) { + let n = t; + return this.unset = () => n = void 0, this.isset = () => n !== void 0, this.dispose = () => { + n && (n(), n = void 0); + }, this; } } -class Node$1 { - constructor(element) { - this.element = element; - this.next = Node$1.Undefined; - this.prev = Node$1.Undefined; +class Z { + constructor(t) { + this.element = t, this.next = Z.Undefined, this.prev = Z.Undefined; } } -Node$1.Undefined = new Node$1(void 0); -class LinkedList { +Z.Undefined = new Z(void 0); +class xi { constructor() { - this._first = Node$1.Undefined; - this._last = Node$1.Undefined; - this._size = 0; + this._first = Z.Undefined, this._last = Z.Undefined, this._size = 0; } get size() { return this._size; } isEmpty() { - return this._first === Node$1.Undefined; + return this._first === Z.Undefined; } clear() { - let node = this._first; - while (node !== Node$1.Undefined) { - const next = node.next; - node.prev = Node$1.Undefined; - node.next = Node$1.Undefined; - node = next; + let t = this._first; + for (; t !== Z.Undefined; ) { + const n = t.next; + t.prev = Z.Undefined, t.next = Z.Undefined, t = n; } - this._first = Node$1.Undefined; - this._last = Node$1.Undefined; - this._size = 0; + this._first = Z.Undefined, this._last = Z.Undefined, this._size = 0; } - unshift(element) { - return this._insert(element, false); + unshift(t) { + return this._insert(t, !1); } - push(element) { - return this._insert(element, true); + push(t) { + return this._insert(t, !0); } - _insert(element, atTheEnd) { - const newNode = new Node$1(element); - if (this._first === Node$1.Undefined) { - this._first = newNode; - this._last = newNode; - } else if (atTheEnd) { - const oldLast = this._last; - this._last = newNode; - newNode.prev = oldLast; - oldLast.next = newNode; + _insert(t, n) { + const r = new Z(t); + if (this._first === Z.Undefined) + this._first = r, this._last = r; + else if (n) { + const a = this._last; + this._last = r, r.prev = a, a.next = r; } else { - const oldFirst = this._first; - this._first = newNode; - newNode.next = oldFirst; - oldFirst.prev = newNode; + const a = this._first; + this._first = r, r.next = a, a.prev = r; } this._size += 1; - let didRemove = false; + let i = !1; return () => { - if (!didRemove) { - didRemove = true; - this._remove(newNode); - } + i || (i = !0, this._remove(r)); }; } shift() { - if (this._first === Node$1.Undefined) { - return void 0; - } else { - const res = this._first.element; - this._remove(this._first); - return res; + if (this._first !== Z.Undefined) { + const t = this._first.element; + return this._remove(this._first), t; } } pop() { - if (this._last === Node$1.Undefined) { - return void 0; - } else { - const res = this._last.element; - this._remove(this._last); - return res; + if (this._last !== Z.Undefined) { + const t = this._last.element; + return this._remove(this._last), t; } } - _remove(node) { - if (node.prev !== Node$1.Undefined && node.next !== Node$1.Undefined) { - const anchor = node.prev; - anchor.next = node.next; - node.next.prev = anchor; - } else if (node.prev === Node$1.Undefined && node.next === Node$1.Undefined) { - this._first = Node$1.Undefined; - this._last = Node$1.Undefined; - } else if (node.next === Node$1.Undefined) { - this._last = this._last.prev; - this._last.next = Node$1.Undefined; - } else if (node.prev === Node$1.Undefined) { - this._first = this._first.next; - this._first.prev = Node$1.Undefined; - } + _remove(t) { + if (t.prev !== Z.Undefined && t.next !== Z.Undefined) { + const n = t.prev; + n.next = t.next, t.next.prev = n; + } else + t.prev === Z.Undefined && t.next === Z.Undefined ? (this._first = Z.Undefined, this._last = Z.Undefined) : t.next === Z.Undefined ? (this._last = this._last.prev, this._last.next = Z.Undefined) : t.prev === Z.Undefined && (this._first = this._first.next, this._first.prev = Z.Undefined); this._size -= 1; } *[Symbol.iterator]() { - let node = this._first; - while (node !== Node$1.Undefined) { - yield node.element; - node = node.next; - } + let t = this._first; + for (; t !== Z.Undefined; ) + yield t.element, t = t.next; } } -var _a$2; -const LANGUAGE_DEFAULT = "en"; -let _isWindows = false; -let _isMacintosh = false; -let _isLinux = false; -let _isWeb = false; -let _locale = void 0; -let _language = LANGUAGE_DEFAULT; -let _translationsConfigFile = void 0; -let _userAgent = void 0; -const globals = typeof self === "object" ? self : typeof global === "object" ? global : {}; -let nodeProcess = void 0; -if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== "undefined") { - nodeProcess = globals.vscode.process; -} else if (typeof process !== "undefined") { - nodeProcess = process; -} -const isElectronProcess = typeof ((_a$2 = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a$2 === void 0 ? void 0 : _a$2.electron) === "string"; -const isElectronRenderer = isElectronProcess && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.type) === "renderer"; -if (typeof navigator === "object" && !isElectronRenderer) { - _userAgent = navigator.userAgent; - _isWindows = _userAgent.indexOf("Windows") >= 0; - _isMacintosh = _userAgent.indexOf("Macintosh") >= 0; - (_userAgent.indexOf("Macintosh") >= 0 || _userAgent.indexOf("iPad") >= 0 || _userAgent.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0; - _isLinux = _userAgent.indexOf("Linux") >= 0; - _isWeb = true; - _locale = navigator.language; - _language = _locale; -} else if (typeof nodeProcess === "object") { - _isWindows = nodeProcess.platform === "win32"; - _isMacintosh = nodeProcess.platform === "darwin"; - _isLinux = nodeProcess.platform === "linux"; - _isLinux && !!nodeProcess.env["SNAP"] && !!nodeProcess.env["SNAP_REVISION"]; - !!nodeProcess.env["CI"] || !!nodeProcess.env["BUILD_ARTIFACTSTAGINGDIRECTORY"]; - _locale = LANGUAGE_DEFAULT; - _language = LANGUAGE_DEFAULT; - const rawNlsConfig = nodeProcess.env["VSCODE_NLS_CONFIG"]; - if (rawNlsConfig) { +var Bn; +const gn = "en"; +let cr = !1, hr = !1, jn = !1, qs = !1, rn, qn = gn, $o, Ye; +const fe = typeof self == "object" ? self : typeof global == "object" ? global : {}; +let pe; +typeof fe.vscode < "u" && typeof fe.vscode.process < "u" ? pe = fe.vscode.process : typeof process < "u" && (pe = process); +const Ho = typeof ((Bn = pe == null ? void 0 : pe.versions) === null || Bn === void 0 ? void 0 : Bn.electron) == "string", Go = Ho && (pe == null ? void 0 : pe.type) === "renderer"; +if (typeof navigator == "object" && !Go) + Ye = navigator.userAgent, cr = Ye.indexOf("Windows") >= 0, hr = Ye.indexOf("Macintosh") >= 0, (Ye.indexOf("Macintosh") >= 0 || Ye.indexOf("iPad") >= 0 || Ye.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0, jn = Ye.indexOf("Linux") >= 0, qs = !0, rn = navigator.language, qn = rn; +else if (typeof pe == "object") { + cr = pe.platform === "win32", hr = pe.platform === "darwin", jn = pe.platform === "linux", jn && !!pe.env.SNAP && pe.env.SNAP_REVISION, pe.env.CI || pe.env.BUILD_ARTIFACTSTAGINGDIRECTORY, rn = gn, qn = gn; + const e = pe.env.VSCODE_NLS_CONFIG; + if (e) try { - const nlsConfig = JSON.parse(rawNlsConfig); - const resolved = nlsConfig.availableLanguages["*"]; - _locale = nlsConfig.locale; - _language = resolved ? resolved : LANGUAGE_DEFAULT; - _translationsConfigFile = nlsConfig._translationsConfigFile; - } catch (e) { + const t = JSON.parse(e), n = t.availableLanguages["*"]; + rn = t.locale, qn = n || gn, $o = t._translationsConfigFile; + } catch { } - } -} else { +} else console.error("Unable to resolve platform."); -} -const isWindows = _isWindows; -const isMacintosh = _isMacintosh; -_isWeb && typeof globals.importScripts === "function"; -const userAgent = _userAgent; +const Bt = cr, Jo = hr; +qs && fe.importScripts; +const Oe = Ye; (() => { - if (typeof globals.postMessage === "function" && !globals.importScripts) { - let pending = []; - globals.addEventListener("message", (e) => { - if (e.data && e.data.vscodeScheduleAsyncWork) { - for (let i = 0, len = pending.length; i < len; i++) { - const candidate = pending[i]; - if (candidate.id === e.data.vscodeScheduleAsyncWork) { - pending.splice(i, 1); - candidate.callback(); + if (typeof fe.postMessage == "function" && !fe.importScripts) { + let e = []; + fe.addEventListener("message", (n) => { + if (n.data && n.data.vscodeScheduleAsyncWork) + for (let r = 0, i = e.length; r < i; r++) { + const a = e[r]; + if (a.id === n.data.vscodeScheduleAsyncWork) { + e.splice(r, 1), a.callback(); return; } } - } }); - let lastId = 0; - return (callback) => { - const myId = ++lastId; - pending.push({ - id: myId, - callback - }); - globals.postMessage({ vscodeScheduleAsyncWork: myId }, "*"); + let t = 0; + return (n) => { + const r = ++t; + e.push({ + id: r, + callback: n + }), fe.postMessage({ vscodeScheduleAsyncWork: r }, "*"); }; } - return (callback) => setTimeout(callback); + return (e) => setTimeout(e); })(); -const isChrome = !!(userAgent && userAgent.indexOf("Chrome") >= 0); -!!(userAgent && userAgent.indexOf("Firefox") >= 0); -!!(!isChrome && (userAgent && userAgent.indexOf("Safari") >= 0)); -!!(userAgent && userAgent.indexOf("Edg/") >= 0); -!!(userAgent && userAgent.indexOf("Android") >= 0); -const hasPerformanceNow = globals.performance && typeof globals.performance.now === "function"; -class StopWatch { - constructor(highResolution) { - this._highResolution = hasPerformanceNow && highResolution; - this._startTime = this._now(); - this._stopTime = -1; +const Xo = !!(Oe && Oe.indexOf("Chrome") >= 0); +Oe && Oe.indexOf("Firefox") >= 0; +!Xo && Oe && Oe.indexOf("Safari") >= 0; +Oe && Oe.indexOf("Edg/") >= 0; +Oe && Oe.indexOf("Android") >= 0; +const Yo = fe.performance && typeof fe.performance.now == "function"; +class Tn { + constructor(t) { + this._highResolution = Yo && t, this._startTime = this._now(), this._stopTime = -1; } - static create(highResolution = true) { - return new StopWatch(highResolution); + static create(t = !0) { + return new Tn(t); } stop() { this._stopTime = this._now(); } elapsed() { - if (this._stopTime !== -1) { - return this._stopTime - this._startTime; - } - return this._now() - this._startTime; + return this._stopTime !== -1 ? this._stopTime - this._startTime : this._now() - this._startTime; } _now() { - return this._highResolution ? globals.performance.now() : Date.now(); + return this._highResolution ? fe.performance.now() : Date.now(); } } -var Event; -(function(Event2) { - Event2.None = () => Disposable.None; - function once2(event) { - return (listener, thisArgs = null, disposables) => { - let didFire = false; - let result; - result = event((e) => { - if (didFire) { - return; - } else if (result) { - result.dispose(); - } else { - didFire = true; - } - return listener.call(thisArgs, e); - }, null, disposables); - if (didFire) { - result.dispose(); - } - return result; +var dr; +(function(e) { + e.None = () => Xr.None; + function t(k) { + return (F, P = null, N) => { + let z = !1, T; + return T = k((j) => { + if (!z) + return T ? T.dispose() : z = !0, F.call(P, j); + }, null, N), z && T.dispose(), T; }; } - Event2.once = once2; - function map(event, map2, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((i) => listener.call(thisArgs, map2(i)), null, disposables), disposable); + e.once = t; + function n(k, F, P) { + return h((N, z = null, T) => k((j) => N.call(z, F(j)), null, T), P); } - Event2.map = map; - function forEach(event, each, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((i) => { - each(i); - listener.call(thisArgs, i); - }, null, disposables), disposable); + e.map = n; + function r(k, F, P) { + return h((N, z = null, T) => k((j) => { + F(j), N.call(z, j); + }, null, T), P); } - Event2.forEach = forEach; - function filter(event, filter2, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((e) => filter2(e) && listener.call(thisArgs, e), null, disposables), disposable); + e.forEach = r; + function i(k, F, P) { + return h((N, z = null, T) => k((j) => F(j) && N.call(z, j), null, T), P); } - Event2.filter = filter; - function signal(event) { - return event; + e.filter = i; + function a(k) { + return k; } - Event2.signal = signal; - function any(...events) { - return (listener, thisArgs = null, disposables) => combinedDisposable(...events.map((event) => event((e) => listener.call(thisArgs, e), null, disposables))); + e.signal = a; + function o(...k) { + return (F, P = null, N) => jo(...k.map((z) => z((T) => F.call(P, T), null, N))); } - Event2.any = any; - function reduce(event, merge, initial, disposable) { - let output = initial; - return map(event, (e) => { - output = merge(output, e); - return output; - }, disposable); + e.any = o; + function l(k, F, P, N) { + let z = P; + return n(k, (T) => (z = F(z, T), z), N); } - Event2.reduce = reduce; - function snapshot(event, disposable) { - let listener; - const options = { + e.reduce = l; + function h(k, F) { + let P; + const N = { onFirstListenerAdd() { - listener = event(emitter.fire, emitter); + P = k(z.fire, z); }, onLastListenerRemove() { - listener.dispose(); + P.dispose(); } - }; - const emitter = new Emitter(options); - if (disposable) { - disposable.add(emitter); - } - return emitter.event; + }, z = new He(N); + return F && F.add(z), z.event; } - function debounce(event, merge, delay = 100, leading = false, leakWarningThreshold, disposable) { - let subscription; - let output = void 0; - let handle = void 0; - let numDebouncedCalls = 0; - const options = { - leakWarningThreshold, + function c(k, F, P = 100, N = !1, z, T) { + let j, U, O, re = 0; + const de = { + leakWarningThreshold: z, onFirstListenerAdd() { - subscription = event((cur) => { - numDebouncedCalls++; - output = merge(output, cur); - if (leading && !handle) { - emitter.fire(output); - output = void 0; - } - clearTimeout(handle); - handle = setTimeout(() => { - const _output = output; - output = void 0; - handle = void 0; - if (!leading || numDebouncedCalls > 1) { - emitter.fire(_output); - } - numDebouncedCalls = 0; - }, delay); + j = k((Ne) => { + re++, U = F(U, Ne), N && !O && (Me.fire(U), U = void 0), clearTimeout(O), O = setTimeout(() => { + const D = U; + U = void 0, O = void 0, (!N || re > 1) && Me.fire(D), re = 0; + }, P); }); }, onLastListenerRemove() { - subscription.dispose(); + j.dispose(); } - }; - const emitter = new Emitter(options); - if (disposable) { - disposable.add(emitter); - } - return emitter.event; + }, Me = new He(de); + return T && T.add(Me), Me.event; } - Event2.debounce = debounce; - function latch(event, equals = (a2, b) => a2 === b, disposable) { - let firstCall = true; - let cache; - return filter(event, (value) => { - const shouldEmit = firstCall || !equals(value, cache); - firstCall = false; - cache = value; - return shouldEmit; - }, disposable); + e.debounce = c; + function d(k, F = (N, z) => N === z, P) { + let N = !0, z; + return i(k, (T) => { + const j = N || !F(T, z); + return N = !1, z = T, j; + }, P); } - Event2.latch = latch; - function split(event, isT, disposable) { + e.latch = d; + function p(k, F, P) { return [ - Event2.filter(event, isT, disposable), - Event2.filter(event, (e) => !isT(e), disposable) + e.filter(k, F, P), + e.filter(k, (N) => !F(N), P) ]; } - Event2.split = split; - function buffer(event, flushAfterTimeout = false, _buffer = []) { - let buffer2 = _buffer.slice(); - let listener = event((e) => { - if (buffer2) { - buffer2.push(e); - } else { - emitter.fire(e); - } + e.split = p; + function f(k, F = !1, P = []) { + let N = P.slice(), z = k((U) => { + N ? N.push(U) : j.fire(U); }); - const flush = () => { - if (buffer2) { - buffer2.forEach((e) => emitter.fire(e)); - } - buffer2 = null; - }; - const emitter = new Emitter({ + const T = () => { + N && N.forEach((U) => j.fire(U)), N = null; + }, j = new He({ onFirstListenerAdd() { - if (!listener) { - listener = event((e) => emitter.fire(e)); - } + z || (z = k((U) => j.fire(U))); }, onFirstListenerDidAdd() { - if (buffer2) { - if (flushAfterTimeout) { - setTimeout(flush); - } else { - flush(); - } - } + N && (F ? setTimeout(T) : T()); }, onLastListenerRemove() { - if (listener) { - listener.dispose(); - } - listener = null; + z && z.dispose(), z = null; } }); - return emitter.event; + return j.event; } - Event2.buffer = buffer; - class ChainableEvent { - constructor(event) { - this.event = event; + e.buffer = f; + class g { + constructor(F) { + this.event = F; } - map(fn) { - return new ChainableEvent(map(this.event, fn)); + map(F) { + return new g(n(this.event, F)); } - forEach(fn) { - return new ChainableEvent(forEach(this.event, fn)); + forEach(F) { + return new g(r(this.event, F)); } - filter(fn) { - return new ChainableEvent(filter(this.event, fn)); + filter(F) { + return new g(i(this.event, F)); } - reduce(merge, initial) { - return new ChainableEvent(reduce(this.event, merge, initial)); + reduce(F, P) { + return new g(l(this.event, F, P)); } latch() { - return new ChainableEvent(latch(this.event)); + return new g(d(this.event)); } - debounce(merge, delay = 100, leading = false, leakWarningThreshold) { - return new ChainableEvent(debounce(this.event, merge, delay, leading, leakWarningThreshold)); + debounce(F, P = 100, N = !1, z) { + return new g(c(this.event, F, P, N, z)); } - on(listener, thisArgs, disposables) { - return this.event(listener, thisArgs, disposables); + on(F, P, N) { + return this.event(F, P, N); } - once(listener, thisArgs, disposables) { - return once2(this.event)(listener, thisArgs, disposables); + once(F, P, N) { + return t(this.event)(F, P, N); } } - function chain(event) { - return new ChainableEvent(event); + function w(k) { + return new g(k); } - Event2.chain = chain; - function fromNodeEventEmitter(emitter, eventName, map2 = (id) => id) { - const fn = (...args) => result.fire(map2(...args)); - const onFirstListenerAdd = () => emitter.on(eventName, fn); - const onLastListenerRemove = () => emitter.removeListener(eventName, fn); - const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove }); - return result.event; + e.chain = w; + function b(k, F, P = (N) => N) { + const N = (...U) => j.fire(P(...U)), z = () => k.on(F, N), T = () => k.removeListener(F, N), j = new He({ onFirstListenerAdd: z, onLastListenerRemove: T }); + return j.event; } - Event2.fromNodeEventEmitter = fromNodeEventEmitter; - function fromDOMEventEmitter(emitter, eventName, map2 = (id) => id) { - const fn = (...args) => result.fire(map2(...args)); - const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn); - const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn); - const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove }); - return result.event; + e.fromNodeEventEmitter = b; + function y(k, F, P = (N) => N) { + const N = (...U) => j.fire(P(...U)), z = () => k.addEventListener(F, N), T = () => k.removeEventListener(F, N), j = new He({ onFirstListenerAdd: z, onLastListenerRemove: T }); + return j.event; } - Event2.fromDOMEventEmitter = fromDOMEventEmitter; - function toPromise(event) { - return new Promise((resolve) => once2(event)(resolve)); + e.fromDOMEventEmitter = y; + function A(k) { + return new Promise((F) => t(k)(F)); } - Event2.toPromise = toPromise; - function runAndSubscribe(event, handler) { - handler(void 0); - return event((e) => handler(e)); + e.toPromise = A; + function C(k, F) { + return F(void 0), k((P) => F(P)); } - Event2.runAndSubscribe = runAndSubscribe; - function runAndSubscribeWithStore(event, handler) { - let store = null; - function run(e) { - store === null || store === void 0 ? void 0 : store.dispose(); - store = new DisposableStore(); - handler(e, store); + e.runAndSubscribe = C; + function R(k, F) { + let P = null; + function N(T) { + P == null || P.dispose(), P = new At(), F(T, P); } - run(void 0); - const disposable = event((e) => run(e)); - return toDisposable(() => { - disposable.dispose(); - store === null || store === void 0 ? void 0 : store.dispose(); + N(void 0); + const z = k((T) => N(T)); + return wn(() => { + z.dispose(), P == null || P.dispose(); }); } - Event2.runAndSubscribeWithStore = runAndSubscribeWithStore; -})(Event || (Event = {})); -class EventProfiling { - constructor(name) { - this._listenerCount = 0; - this._invocationCount = 0; - this._elapsedOverall = 0; - this._name = `${name}_${EventProfiling._idPool++}`; + e.runAndSubscribeWithStore = R; +})(dr || (dr = {})); +class Wn { + constructor(t) { + this._listenerCount = 0, this._invocationCount = 0, this._elapsedOverall = 0, this._name = `${t}_${Wn._idPool++}`; } - start(listenerCount) { - this._stopWatch = new StopWatch(true); - this._listenerCount = listenerCount; + start(t) { + this._stopWatch = new Tn(!0), this._listenerCount = t; } stop() { if (this._stopWatch) { - const elapsed = this._stopWatch.elapsed(); - this._elapsedOverall += elapsed; - this._invocationCount += 1; - console.info(`did FIRE ${this._name}: elapsed_ms: ${elapsed.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`); - this._stopWatch = void 0; + const t = this._stopWatch.elapsed(); + this._elapsedOverall += t, this._invocationCount += 1, console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`), this._stopWatch = void 0; } } } -EventProfiling._idPool = 0; -class Stacktrace { - constructor(value) { - this.value = value; +Wn._idPool = 0; +class Yr { + constructor(t) { + this.value = t; } static create() { - var _a2; - return new Stacktrace((_a2 = new Error().stack) !== null && _a2 !== void 0 ? _a2 : ""); + var t; + return new Yr((t = new Error().stack) !== null && t !== void 0 ? t : ""); } print() { - console.warn(this.value.split("\n").slice(2).join("\n")); + console.warn(this.value.split(` +`).slice(2).join(` +`)); } } -class Listener { - constructor(callback, callbackThis, stack) { - this.callback = callback; - this.callbackThis = callbackThis; - this.stack = stack; - this.subscription = new SafeDisposable(); +class Ko { + constructor(t, n, r) { + this.callback = t, this.callbackThis = n, this.stack = r, this.subscription = new qo(); } - invoke(e) { - this.callback.call(this.callbackThis, e); + invoke(t) { + this.callback.call(this.callbackThis, t); } } -class Emitter { - constructor(options) { - var _a2; - this._disposed = false; - this._options = options; - this._leakageMon = void 0; - this._perfMon = ((_a2 = this._options) === null || _a2 === void 0 ? void 0 : _a2._profName) ? new EventProfiling(this._options._profName) : void 0; +class He { + constructor(t) { + var n; + this._disposed = !1, this._options = t, this._leakageMon = void 0, this._perfMon = !((n = this._options) === null || n === void 0) && n._profName ? new Wn(this._options._profName) : void 0; } dispose() { - var _a2, _b, _c, _d; - if (!this._disposed) { - this._disposed = true; - if (this._listeners) { - this._listeners.clear(); - } - (_a2 = this._deliveryQueue) === null || _a2 === void 0 ? void 0 : _a2.clear(); - (_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.onLastListenerRemove) === null || _c === void 0 ? void 0 : _c.call(_b); - (_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose(); - } + var t, n, r, i; + this._disposed || (this._disposed = !0, this._listeners && this._listeners.clear(), (t = this._deliveryQueue) === null || t === void 0 || t.clear(), (r = (n = this._options) === null || n === void 0 ? void 0 : n.onLastListenerRemove) === null || r === void 0 || r.call(n), (i = this._leakageMon) === null || i === void 0 || i.dispose()); } get event() { - if (!this._event) { - this._event = (callback, thisArgs, disposables) => { - var _a2, _b, _c; - if (!this._listeners) { - this._listeners = new LinkedList(); - } - const firstListener = this._listeners.isEmpty(); - if (firstListener && ((_a2 = this._options) === null || _a2 === void 0 ? void 0 : _a2.onFirstListenerAdd)) { - this._options.onFirstListenerAdd(this); - } - let removeMonitor; - let stack; - if (this._leakageMon && this._listeners.size >= 30) { - stack = Stacktrace.create(); - removeMonitor = this._leakageMon.check(stack, this._listeners.size + 1); - } - const listener = new Listener(callback, thisArgs, stack); - const removeListener = this._listeners.push(listener); - if (firstListener && ((_b = this._options) === null || _b === void 0 ? void 0 : _b.onFirstListenerDidAdd)) { - this._options.onFirstListenerDidAdd(this); - } - if ((_c = this._options) === null || _c === void 0 ? void 0 : _c.onListenerDidAdd) { - this._options.onListenerDidAdd(this, callback, thisArgs); - } - const result = listener.subscription.set(() => { - if (removeMonitor) { - removeMonitor(); - } - if (!this._disposed) { - removeListener(); - if (this._options && this._options.onLastListenerRemove) { - const hasListeners = this._listeners && !this._listeners.isEmpty(); - if (!hasListeners) { - this._options.onLastListenerRemove(this); - } - } - } - }); - if (disposables instanceof DisposableStore) { - disposables.add(result); - } else if (Array.isArray(disposables)) { - disposables.push(result); - } - return result; - }; - } - return this._event; + return this._event || (this._event = (t, n, r) => { + var i, a, o; + this._listeners || (this._listeners = new xi()); + const l = this._listeners.isEmpty(); + l && ((i = this._options) === null || i === void 0 ? void 0 : i.onFirstListenerAdd) && this._options.onFirstListenerAdd(this); + let h, c; + this._leakageMon && this._listeners.size >= 30 && (c = Yr.create(), h = this._leakageMon.check(c, this._listeners.size + 1)); + const d = new Ko(t, n, c), p = this._listeners.push(d); + l && ((a = this._options) === null || a === void 0 ? void 0 : a.onFirstListenerDidAdd) && this._options.onFirstListenerDidAdd(this), !((o = this._options) === null || o === void 0) && o.onListenerDidAdd && this._options.onListenerDidAdd(this, t, n); + const f = d.subscription.set(() => { + h && h(), this._disposed || (p(), this._options && this._options.onLastListenerRemove && (this._listeners && !this._listeners.isEmpty() || this._options.onLastListenerRemove(this))); + }); + return r instanceof At ? r.add(f) : Array.isArray(r) && r.push(f), f; + }), this._event; } - fire(event) { - var _a2, _b; + fire(t) { + var n, r; if (this._listeners) { - if (!this._deliveryQueue) { - this._deliveryQueue = new LinkedList(); - } - for (let listener of this._listeners) { - this._deliveryQueue.push([listener, event]); - } - (_a2 = this._perfMon) === null || _a2 === void 0 ? void 0 : _a2.start(this._deliveryQueue.size); - while (this._deliveryQueue.size > 0) { - const [listener, event2] = this._deliveryQueue.shift(); + this._deliveryQueue || (this._deliveryQueue = new xi()); + for (let i of this._listeners) + this._deliveryQueue.push([i, t]); + for ((n = this._perfMon) === null || n === void 0 || n.start(this._deliveryQueue.size); this._deliveryQueue.size > 0; ) { + const [i, a] = this._deliveryQueue.shift(); try { - listener.invoke(event2); - } catch (e) { - onUnexpectedError(e); + i.invoke(a); + } catch (o) { + Wo(o); } } - (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.stop(); + (r = this._perfMon) === null || r === void 0 || r.stop(); } } } -function getAllPropertyNames(obj) { - let res = []; - let proto = Object.getPrototypeOf(obj); - while (Object.prototype !== proto) { - res = res.concat(Object.getOwnPropertyNames(proto)); - proto = Object.getPrototypeOf(proto); - } - return res; +function Zo(e) { + let t = [], n = Object.getPrototypeOf(e); + for (; Object.prototype !== n; ) + t = t.concat(Object.getOwnPropertyNames(n)), n = Object.getPrototypeOf(n); + return t; } -function getAllMethodNames(obj) { - const methods = []; - for (const prop of getAllPropertyNames(obj)) { - if (typeof obj[prop] === "function") { - methods.push(prop); - } - } - return methods; +function ur(e) { + const t = []; + for (const n of Zo(e)) + typeof e[n] == "function" && t.push(n); + return t; } -function createProxyObject$1(methodNames, invoke) { - const createProxyMethod = (method) => { - return function() { - const args = Array.prototype.slice.call(arguments, 0); - return invoke(method, args); - }; +function Qo(e, t) { + const n = (i) => function() { + const a = Array.prototype.slice.call(arguments, 0); + return t(i, a); }; - let result = {}; - for (const methodName of methodNames) { - result[methodName] = createProxyMethod(methodName); - } - return result; + let r = {}; + for (const i of e) + r[i] = n(i); + return r; } -function assertNever(value, message = "Unreachable") { - throw new Error(message); +function el(e, t = "Unreachable") { + throw new Error(t); } -class LRUCachedComputed { - constructor(computeFn) { - this.computeFn = computeFn; - this.lastCache = void 0; - this.lastArgKey = void 0; +class tl { + constructor(t) { + this.computeFn = t, this.lastCache = void 0, this.lastArgKey = void 0; } - get(arg) { - const key = JSON.stringify(arg); - if (this.lastArgKey !== key) { - this.lastArgKey = key; - this.lastCache = this.computeFn(arg); - } - return this.lastCache; + get(t) { + const n = JSON.stringify(t); + return this.lastArgKey !== n && (this.lastArgKey = n, this.lastCache = this.computeFn(t)), this.lastCache; } } -class Lazy { - constructor(executor) { - this.executor = executor; - this._didRun = false; +class $s { + constructor(t) { + this.executor = t, this._didRun = !1; } getValue() { - if (!this._didRun) { + if (!this._didRun) try { this._value = this.executor(); - } catch (err) { - this._error = err; + } catch (t) { + this._error = t; } finally { - this._didRun = true; + this._didRun = !0; } - } - if (this._error) { + if (this._error) throw this._error; - } return this._value; } get rawValue() { return this._value; } } -var _a$1; -function escapeRegExpCharacters(value) { - return value.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); +var Hs; +function nl(e) { + return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); } -function splitLines(str) { - return str.split(/\r\n|\r|\n/); +function rl(e) { + return e.split(/\r\n|\r|\n/); } -function firstNonWhitespaceIndex(str) { - for (let i = 0, len = str.length; i < len; i++) { - const chCode = str.charCodeAt(i); - if (chCode !== 32 && chCode !== 9) { - return i; - } +function il(e) { + for (let t = 0, n = e.length; t < n; t++) { + const r = e.charCodeAt(t); + if (r !== 32 && r !== 9) + return t; } return -1; } -function lastNonWhitespaceIndex(str, startIndex = str.length - 1) { - for (let i = startIndex; i >= 0; i--) { - const chCode = str.charCodeAt(i); - if (chCode !== 32 && chCode !== 9) { - return i; - } +function al(e, t = e.length - 1) { + for (let n = t; n >= 0; n--) { + const r = e.charCodeAt(n); + if (r !== 32 && r !== 9) + return n; } return -1; } -function isUpperAsciiLetter(code) { - return code >= 65 && code <= 90; +function Gs(e) { + return e >= 65 && e <= 90; } -function isHighSurrogate(charCode) { - return 55296 <= charCode && charCode <= 56319; +function pr(e) { + return 55296 <= e && e <= 56319; } -function isLowSurrogate(charCode) { - return 56320 <= charCode && charCode <= 57343; +function sl(e) { + return 56320 <= e && e <= 57343; } -function computeCodePoint(highSurrogate, lowSurrogate) { - return (highSurrogate - 55296 << 10) + (lowSurrogate - 56320) + 65536; +function ol(e, t) { + return (e - 55296 << 10) + (t - 56320) + 65536; } -function getNextCodePoint(str, len, offset) { - const charCode = str.charCodeAt(offset); - if (isHighSurrogate(charCode) && offset + 1 < len) { - const nextCharCode = str.charCodeAt(offset + 1); - if (isLowSurrogate(nextCharCode)) { - return computeCodePoint(charCode, nextCharCode); - } +function ll(e, t, n) { + const r = e.charCodeAt(n); + if (pr(r) && n + 1 < t) { + const i = e.charCodeAt(n + 1); + if (sl(i)) + return ol(r, i); } - return charCode; + return r; } -const IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/; -function isBasicASCII(str) { - return IS_BASIC_ASCII.test(str); +const cl = /^[\t\n\r\x20-\x7E]*$/; +function hl(e) { + return cl.test(e); } -class AmbiguousCharacters { - constructor(confusableDictionary) { - this.confusableDictionary = confusableDictionary; +class ze { + constructor(t) { + this.confusableDictionary = t; } - static getInstance(locales) { - return AmbiguousCharacters.cache.get(Array.from(locales)); + static getInstance(t) { + return ze.cache.get(Array.from(t)); } static getLocales() { - return AmbiguousCharacters._locales.getValue(); + return ze._locales.getValue(); } - isAmbiguous(codePoint) { - return this.confusableDictionary.has(codePoint); + isAmbiguous(t) { + return this.confusableDictionary.has(t); } - getPrimaryConfusable(codePoint) { - return this.confusableDictionary.get(codePoint); + getPrimaryConfusable(t) { + return this.confusableDictionary.get(t); } getConfusableCodePoints() { return new Set(this.confusableDictionary.keys()); } } -_a$1 = AmbiguousCharacters; -AmbiguousCharacters.ambiguousCharacterData = new Lazy(() => { - return 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],"_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]}'); +Hs = ze; +ze.ambiguousCharacterData = new $s(() => 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],"_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]}')); +ze.cache = new tl((e) => { + function t(c) { + const d = /* @__PURE__ */ new Map(); + for (let p = 0; p < c.length; p += 2) + d.set(c[p], c[p + 1]); + return d; + } + function n(c, d) { + const p = new Map(c); + for (const [f, g] of d) + p.set(f, g); + return p; + } + function r(c, d) { + if (!c) + return d; + const p = /* @__PURE__ */ new Map(); + for (const [f, g] of c) + d.has(f) && p.set(f, g); + return p; + } + const i = Hs.ambiguousCharacterData.getValue(); + let a = e.filter((c) => !c.startsWith("_") && c in i); + a.length === 0 && (a = ["_default"]); + let o; + for (const c of a) { + const d = t(i[c]); + o = r(o, d); + } + const l = t(i._common), h = n(l, o); + return new ze(h); }); -AmbiguousCharacters.cache = new LRUCachedComputed((locales) => { - function arrayToMap(arr) { - const result = /* @__PURE__ */ new Map(); - for (let i = 0; i < arr.length; i += 2) { - result.set(arr[i], arr[i + 1]); - } - return result; - } - function mergeMaps(map1, map2) { - const result = new Map(map1); - for (const [key, value] of map2) { - result.set(key, value); - } - return result; - } - function intersectMaps(map1, map2) { - if (!map1) { - return map2; - } - const result = /* @__PURE__ */ new Map(); - for (const [key, value] of map1) { - if (map2.has(key)) { - result.set(key, value); - } - } - return result; - } - const data = _a$1.ambiguousCharacterData.getValue(); - let filteredLocales = locales.filter((l) => !l.startsWith("_") && l in data); - if (filteredLocales.length === 0) { - filteredLocales = ["_default"]; - } - let languageSpecificMap = void 0; - for (const locale of filteredLocales) { - const map2 = arrayToMap(data[locale]); - languageSpecificMap = intersectMaps(languageSpecificMap, map2); - } - const commonMap = arrayToMap(data["_common"]); - const map = mergeMaps(commonMap, languageSpecificMap); - return new AmbiguousCharacters(map); -}); -AmbiguousCharacters._locales = new Lazy(() => Object.keys(AmbiguousCharacters.ambiguousCharacterData.getValue()).filter((k) => !k.startsWith("_"))); -class InvisibleCharacters { +ze._locales = new $s(() => Object.keys(ze.ambiguousCharacterData.getValue()).filter((e) => !e.startsWith("_"))); +class tt { 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 getData() { - if (!this._data) { - this._data = new Set(InvisibleCharacters.getRawData()); - } - return this._data; + return this._data || (this._data = new Set(tt.getRawData())), this._data; } - static isInvisibleCharacter(codePoint) { - return InvisibleCharacters.getData().has(codePoint); + static isInvisibleCharacter(t) { + return tt.getData().has(t); } static get codePoints() { - return InvisibleCharacters.getData(); + return tt.getData(); } } -InvisibleCharacters._data = void 0; -const INITIALIZE = "$initialize"; -class RequestMessage { - constructor(vsWorker, req, method, args) { - this.vsWorker = vsWorker; - this.req = req; - this.method = method; - this.args = args; - this.type = 0; +tt._data = void 0; +const dl = "$initialize"; +class ul { + constructor(t, n, r, i) { + this.vsWorker = t, this.req = n, this.method = r, this.args = i, this.type = 0; } } -class ReplyMessage { - constructor(vsWorker, seq, res, err) { - this.vsWorker = vsWorker; - this.seq = seq; - this.res = res; - this.err = err; - this.type = 1; +class Si { + constructor(t, n, r, i) { + this.vsWorker = t, this.seq = n, this.res = r, this.err = i, this.type = 1; } } -class SubscribeEventMessage { - constructor(vsWorker, req, eventName, arg) { - this.vsWorker = vsWorker; - this.req = req; - this.eventName = eventName; - this.arg = arg; - this.type = 2; +class pl { + constructor(t, n, r, i) { + this.vsWorker = t, this.req = n, this.eventName = r, this.arg = i, this.type = 2; } } -class EventMessage { - constructor(vsWorker, req, event) { - this.vsWorker = vsWorker; - this.req = req; - this.event = event; - this.type = 3; +class fl { + constructor(t, n, r) { + this.vsWorker = t, this.req = n, this.event = r, this.type = 3; } } -class UnsubscribeEventMessage { - constructor(vsWorker, req) { - this.vsWorker = vsWorker; - this.req = req; - this.type = 4; +class ml { + constructor(t, n) { + this.vsWorker = t, this.req = n, this.type = 4; } } -class SimpleWorkerProtocol { - constructor(handler) { - this._workerId = -1; - this._handler = handler; - this._lastSentReq = 0; - this._pendingReplies = /* @__PURE__ */ Object.create(null); - this._pendingEmitters = /* @__PURE__ */ new Map(); - this._pendingEvents = /* @__PURE__ */ new Map(); +class gl { + constructor(t) { + this._workerId = -1, this._handler = t, this._lastSentReq = 0, this._pendingReplies = /* @__PURE__ */ Object.create(null), this._pendingEmitters = /* @__PURE__ */ new Map(), this._pendingEvents = /* @__PURE__ */ new Map(); } - setWorkerId(workerId) { - this._workerId = workerId; + setWorkerId(t) { + this._workerId = t; } - sendMessage(method, args) { - const req = String(++this._lastSentReq); - return new Promise((resolve, reject) => { - this._pendingReplies[req] = { - resolve, - reject - }; - this._send(new RequestMessage(this._workerId, req, method, args)); + sendMessage(t, n) { + const r = String(++this._lastSentReq); + return new Promise((i, a) => { + this._pendingReplies[r] = { + resolve: i, + reject: a + }, this._send(new ul(this._workerId, r, t, n)); }); } - listen(eventName, arg) { - let req = null; - const emitter = new Emitter({ + listen(t, n) { + let r = null; + const i = new He({ onFirstListenerAdd: () => { - req = String(++this._lastSentReq); - this._pendingEmitters.set(req, emitter); - this._send(new SubscribeEventMessage(this._workerId, req, eventName, arg)); + r = String(++this._lastSentReq), this._pendingEmitters.set(r, i), this._send(new pl(this._workerId, r, t, n)); }, onLastListenerRemove: () => { - this._pendingEmitters.delete(req); - this._send(new UnsubscribeEventMessage(this._workerId, req)); - req = null; + this._pendingEmitters.delete(r), this._send(new ml(this._workerId, r)), r = null; } }); - return emitter.event; + return i.event; } - handleMessage(message) { - if (!message || !message.vsWorker) { - return; - } - if (this._workerId !== -1 && message.vsWorker !== this._workerId) { - return; - } - this._handleMessage(message); + handleMessage(t) { + !t || !t.vsWorker || this._workerId !== -1 && t.vsWorker !== this._workerId || this._handleMessage(t); } - _handleMessage(msg) { - switch (msg.type) { + _handleMessage(t) { + switch (t.type) { case 1: - return this._handleReplyMessage(msg); + return this._handleReplyMessage(t); case 0: - return this._handleRequestMessage(msg); + return this._handleRequestMessage(t); case 2: - return this._handleSubscribeEventMessage(msg); + return this._handleSubscribeEventMessage(t); case 3: - return this._handleEventMessage(msg); + return this._handleEventMessage(t); case 4: - return this._handleUnsubscribeEventMessage(msg); + return this._handleUnsubscribeEventMessage(t); } } - _handleReplyMessage(replyMessage) { - if (!this._pendingReplies[replyMessage.seq]) { + _handleReplyMessage(t) { + if (!this._pendingReplies[t.seq]) { console.warn("Got reply to unknown seq"); return; } - let reply = this._pendingReplies[replyMessage.seq]; - delete this._pendingReplies[replyMessage.seq]; - if (replyMessage.err) { - let err = replyMessage.err; - if (replyMessage.err.$isError) { - err = new Error(); - err.name = replyMessage.err.name; - err.message = replyMessage.err.message; - err.stack = replyMessage.err.stack; - } - reply.reject(err); + let n = this._pendingReplies[t.seq]; + if (delete this._pendingReplies[t.seq], t.err) { + let r = t.err; + t.err.$isError && (r = new Error(), r.name = t.err.name, r.message = t.err.message, r.stack = t.err.stack), n.reject(r); return; } - reply.resolve(replyMessage.res); + n.resolve(t.res); } - _handleRequestMessage(requestMessage) { - let req = requestMessage.req; - let result = this._handler.handleMessage(requestMessage.method, requestMessage.args); - result.then((r) => { - this._send(new ReplyMessage(this._workerId, req, r, void 0)); - }, (e) => { - if (e.detail instanceof Error) { - e.detail = transformErrorForSerialization(e.detail); - } - this._send(new ReplyMessage(this._workerId, req, void 0, transformErrorForSerialization(e))); + _handleRequestMessage(t) { + let n = t.req; + this._handler.handleMessage(t.method, t.args).then((i) => { + this._send(new Si(this._workerId, n, i, void 0)); + }, (i) => { + i.detail instanceof Error && (i.detail = wi(i.detail)), this._send(new Si(this._workerId, n, void 0, wi(i))); }); } - _handleSubscribeEventMessage(msg) { - const req = msg.req; - const disposable = this._handler.handleEvent(msg.eventName, msg.arg)((event) => { - this._send(new EventMessage(this._workerId, req, event)); + _handleSubscribeEventMessage(t) { + const n = t.req, r = this._handler.handleEvent(t.eventName, t.arg)((i) => { + this._send(new fl(this._workerId, n, i)); }); - this._pendingEvents.set(req, disposable); + this._pendingEvents.set(n, r); } - _handleEventMessage(msg) { - if (!this._pendingEmitters.has(msg.req)) { + _handleEventMessage(t) { + if (!this._pendingEmitters.has(t.req)) { console.warn("Got event for unknown req"); return; } - this._pendingEmitters.get(msg.req).fire(msg.event); + this._pendingEmitters.get(t.req).fire(t.event); } - _handleUnsubscribeEventMessage(msg) { - if (!this._pendingEvents.has(msg.req)) { + _handleUnsubscribeEventMessage(t) { + if (!this._pendingEvents.has(t.req)) { console.warn("Got unsubscribe for unknown req"); return; } - this._pendingEvents.get(msg.req).dispose(); - this._pendingEvents.delete(msg.req); + this._pendingEvents.get(t.req).dispose(), this._pendingEvents.delete(t.req); } - _send(msg) { - let transfer = []; - if (msg.type === 0) { - for (let i = 0; i < msg.args.length; i++) { - if (msg.args[i] instanceof ArrayBuffer) { - transfer.push(msg.args[i]); - } - } - } else if (msg.type === 1) { - if (msg.res instanceof ArrayBuffer) { - transfer.push(msg.res); - } - } - this._handler.sendMessage(msg, transfer); + _send(t) { + let n = []; + if (t.type === 0) + for (let r = 0; r < t.args.length; r++) + t.args[r] instanceof ArrayBuffer && n.push(t.args[r]); + else + t.type === 1 && t.res instanceof ArrayBuffer && n.push(t.res); + this._handler.sendMessage(t, n); } } -function propertyIsEvent(name) { - return name[0] === "o" && name[1] === "n" && isUpperAsciiLetter(name.charCodeAt(2)); +function Js(e) { + return e[0] === "o" && e[1] === "n" && Gs(e.charCodeAt(2)); } -function propertyIsDynamicEvent(name) { - return /^onDynamic/.test(name) && isUpperAsciiLetter(name.charCodeAt(9)); +function Xs(e) { + return /^onDynamic/.test(e) && Gs(e.charCodeAt(9)); } -function createProxyObject(methodNames, invoke, proxyListen) { - const createProxyMethod = (method) => { - return function() { - const args = Array.prototype.slice.call(arguments, 0); - return invoke(method, args); - }; +function bl(e, t, n) { + const r = (o) => function() { + const l = Array.prototype.slice.call(arguments, 0); + return t(o, l); + }, i = (o) => function(l) { + return n(o, l); }; - const createProxyDynamicEvent = (eventName) => { - return function(arg) { - return proxyListen(eventName, arg); - }; - }; - let result = {}; - for (const methodName of methodNames) { - if (propertyIsDynamicEvent(methodName)) { - result[methodName] = createProxyDynamicEvent(methodName); + let a = {}; + for (const o of e) { + if (Xs(o)) { + a[o] = i(o); continue; } - if (propertyIsEvent(methodName)) { - result[methodName] = proxyListen(methodName, void 0); + if (Js(o)) { + a[o] = n(o, void 0); continue; } - result[methodName] = createProxyMethod(methodName); + a[o] = r(o); } - return result; + return a; } -class SimpleWorkerServer { - constructor(postMessage, requestHandlerFactory) { - this._requestHandlerFactory = requestHandlerFactory; - this._requestHandler = null; - this._protocol = new SimpleWorkerProtocol({ - sendMessage: (msg, transfer) => { - postMessage(msg, transfer); +class vl { + constructor(t, n) { + this._requestHandlerFactory = n, this._requestHandler = null, this._protocol = new gl({ + sendMessage: (r, i) => { + t(r, i); }, - handleMessage: (method, args) => this._handleMessage(method, args), - handleEvent: (eventName, arg) => this._handleEvent(eventName, arg) + handleMessage: (r, i) => this._handleMessage(r, i), + handleEvent: (r, i) => this._handleEvent(r, i) }); } - onmessage(msg) { - this._protocol.handleMessage(msg); + onmessage(t) { + this._protocol.handleMessage(t); } - _handleMessage(method, args) { - if (method === INITIALIZE) { - return this.initialize(args[0], args[1], args[2], args[3]); - } - if (!this._requestHandler || typeof this._requestHandler[method] !== "function") { - return Promise.reject(new Error("Missing requestHandler or method: " + method)); - } + _handleMessage(t, n) { + if (t === dl) + return this.initialize(n[0], n[1], n[2], n[3]); + if (!this._requestHandler || typeof this._requestHandler[t] != "function") + return Promise.reject(new Error("Missing requestHandler or method: " + t)); try { - return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args)); - } catch (e) { - return Promise.reject(e); + return Promise.resolve(this._requestHandler[t].apply(this._requestHandler, n)); + } catch (r) { + return Promise.reject(r); } } - _handleEvent(eventName, arg) { - if (!this._requestHandler) { - throw new Error(`Missing requestHandler`); + _handleEvent(t, n) { + if (!this._requestHandler) + throw new Error("Missing requestHandler"); + if (Xs(t)) { + const r = this._requestHandler[t].call(this._requestHandler, n); + if (typeof r != "function") + throw new Error(`Missing dynamic event ${t} on request handler.`); + return r; } - if (propertyIsDynamicEvent(eventName)) { - const event = this._requestHandler[eventName].call(this._requestHandler, arg); - if (typeof event !== "function") { - throw new Error(`Missing dynamic event ${eventName} on request handler.`); - } - return event; + if (Js(t)) { + const r = this._requestHandler[t]; + if (typeof r != "function") + throw new Error(`Missing event ${t} on request handler.`); + return r; } - if (propertyIsEvent(eventName)) { - const event = this._requestHandler[eventName]; - if (typeof event !== "function") { - throw new Error(`Missing event ${eventName} on request handler.`); - } - return event; - } - throw new Error(`Malformed event name ${eventName}`); + throw new Error(`Malformed event name ${t}`); } - initialize(workerId, loaderConfig, moduleId, hostMethods) { - this._protocol.setWorkerId(workerId); - const proxyMethodRequest = (method, args) => { - return this._protocol.sendMessage(method, args); - }; - const proxyListen = (eventName, arg) => { - return this._protocol.listen(eventName, arg); - }; - const hostProxy = createProxyObject(hostMethods, proxyMethodRequest, proxyListen); - if (this._requestHandlerFactory) { - this._requestHandler = this._requestHandlerFactory(hostProxy); - return Promise.resolve(getAllMethodNames(this._requestHandler)); - } - if (loaderConfig) { - if (typeof loaderConfig.baseUrl !== "undefined") { - delete loaderConfig["baseUrl"]; - } - if (typeof loaderConfig.paths !== "undefined") { - if (typeof loaderConfig.paths.vs !== "undefined") { - delete loaderConfig.paths["vs"]; - } - } - if (typeof loaderConfig.trustedTypesPolicy !== void 0) { - delete loaderConfig["trustedTypesPolicy"]; - } - loaderConfig.catchError = true; - globals.require.config(loaderConfig); - } - return new Promise((resolve, reject) => { - const req = globals.require; - req([moduleId], (module) => { - this._requestHandler = module.create(hostProxy); - if (!this._requestHandler) { - reject(new Error(`No RequestHandler!`)); + initialize(t, n, r, i) { + this._protocol.setWorkerId(t); + const l = bl(i, (h, c) => this._protocol.sendMessage(h, c), (h, c) => this._protocol.listen(h, c)); + return this._requestHandlerFactory ? (this._requestHandler = this._requestHandlerFactory(l), Promise.resolve(ur(this._requestHandler))) : (n && (typeof n.baseUrl < "u" && delete n.baseUrl, typeof n.paths < "u" && typeof n.paths.vs < "u" && delete n.paths.vs, typeof n.trustedTypesPolicy !== void 0 && delete n.trustedTypesPolicy, n.catchError = !0, fe.require.config(n)), new Promise((h, c) => { + const d = fe.require; + d([r], (p) => { + if (this._requestHandler = p.create(l), !this._requestHandler) { + c(new Error("No RequestHandler!")); return; } - resolve(getAllMethodNames(this._requestHandler)); - }, reject); - }); + h(ur(this._requestHandler)); + }, c); + })); } } -class DiffChange { - constructor(originalStart, originalLength, modifiedStart, modifiedLength) { - this.originalStart = originalStart; - this.originalLength = originalLength; - this.modifiedStart = modifiedStart; - this.modifiedLength = modifiedLength; +class Ke { + constructor(t, n, r, i) { + this.originalStart = t, this.originalLength = n, this.modifiedStart = r, this.modifiedLength = i; } getOriginalEnd() { return this.originalStart + this.originalLength; @@ -1441,665 +1030,358 @@ class DiffChange { return this.modifiedStart + this.modifiedLength; } } -function numberHash(val, initialHashVal) { - return (initialHashVal << 5) - initialHashVal + val | 0; +function Ci(e, t) { + return (t << 5) - t + e | 0; } -function stringHash(s, hashVal) { - hashVal = numberHash(149417, hashVal); - for (let i = 0, length = s.length; i < length; i++) { - hashVal = numberHash(s.charCodeAt(i), hashVal); - } - return hashVal; +function yl(e, t) { + t = Ci(149417, t); + for (let n = 0, r = e.length; n < r; n++) + t = Ci(e.charCodeAt(n), t); + return t; } -class StringDiffSequence { - constructor(source) { - this.source = source; +class ki { + constructor(t) { + this.source = t; } getElements() { - const source = this.source; - const characters = new Int32Array(source.length); - for (let i = 0, len = source.length; i < len; i++) { - characters[i] = source.charCodeAt(i); - } - return characters; + const t = this.source, n = new Int32Array(t.length); + for (let r = 0, i = t.length; r < i; r++) + n[r] = t.charCodeAt(r); + return n; } } -function stringDiff(original, modified, pretty) { - return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes; +function wl(e, t, n) { + return new Qe(new ki(e), new ki(t)).ComputeDiff(n).changes; } -class Debug { - static Assert(condition, message) { - if (!condition) { - throw new Error(message); - } +class dt { + static Assert(t, n) { + if (!t) + throw new Error(n); } } -class MyArray { - static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { - for (let i = 0; i < length; i++) { - destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; - } +class ut { + static Copy(t, n, r, i, a) { + for (let o = 0; o < a; o++) + r[i + o] = t[n + o]; } - static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { - for (let i = 0; i < length; i++) { - destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; - } + static Copy2(t, n, r, i, a) { + for (let o = 0; o < a; o++) + r[i + o] = t[n + o]; } } -class DiffChangeHelper { +class Fi { constructor() { - this.m_changes = []; - this.m_originalStart = 1073741824; - this.m_modifiedStart = 1073741824; - this.m_originalCount = 0; - this.m_modifiedCount = 0; + this.m_changes = [], this.m_originalStart = 1073741824, this.m_modifiedStart = 1073741824, this.m_originalCount = 0, this.m_modifiedCount = 0; } MarkNextChange() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - this.m_changes.push(new DiffChange(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; + (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.m_changes.push(new Ke(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(originalIndex, modifiedIndex) { - this.m_originalStart = Math.min(this.m_originalStart, originalIndex); - this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); - this.m_originalCount++; + AddOriginalElement(t, n) { + this.m_originalStart = Math.min(this.m_originalStart, t), this.m_modifiedStart = Math.min(this.m_modifiedStart, n), this.m_originalCount++; } - AddModifiedElement(originalIndex, modifiedIndex) { - this.m_originalStart = Math.min(this.m_originalStart, originalIndex); - this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); - this.m_modifiedCount++; + AddModifiedElement(t, n) { + this.m_originalStart = Math.min(this.m_originalStart, t), this.m_modifiedStart = Math.min(this.m_modifiedStart, n), this.m_modifiedCount++; } getChanges() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - this.MarkNextChange(); - } - return this.m_changes; + return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes; } getReverseChanges() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - this.MarkNextChange(); - } - this.m_changes.reverse(); - return this.m_changes; + return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes.reverse(), this.m_changes; } } -class LcsDiff { - constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) { - this.ContinueProcessingPredicate = continueProcessingPredicate; - this._originalSequence = originalSequence; - this._modifiedSequence = modifiedSequence; - const [originalStringElements, originalElementsOrHash, originalHasStrings] = LcsDiff._getElements(originalSequence); - const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = LcsDiff._getElements(modifiedSequence); - this._hasStrings = originalHasStrings && modifiedHasStrings; - this._originalStringElements = originalStringElements; - this._originalElementsOrHash = originalElementsOrHash; - this._modifiedStringElements = modifiedStringElements; - this._modifiedElementsOrHash = modifiedElementsOrHash; - this.m_forwardHistory = []; - this.m_reverseHistory = []; +class Qe { + constructor(t, n, r = null) { + this.ContinueProcessingPredicate = r, this._originalSequence = t, this._modifiedSequence = n; + const [i, a, o] = Qe._getElements(t), [l, h, c] = Qe._getElements(n); + this._hasStrings = o && c, this._originalStringElements = i, this._originalElementsOrHash = a, this._modifiedStringElements = l, this._modifiedElementsOrHash = h, this.m_forwardHistory = [], this.m_reverseHistory = []; } - static _isStringArray(arr) { - return arr.length > 0 && typeof arr[0] === "string"; + static _isStringArray(t) { + return t.length > 0 && typeof t[0] == "string"; } - static _getElements(sequence) { - const elements = sequence.getElements(); - if (LcsDiff._isStringArray(elements)) { - const hashes = new Int32Array(elements.length); - for (let i = 0, len = elements.length; i < len; i++) { - hashes[i] = stringHash(elements[i], 0); - } - return [elements, hashes, true]; + static _getElements(t) { + const n = t.getElements(); + if (Qe._isStringArray(n)) { + const r = new Int32Array(n.length); + for (let i = 0, a = n.length; i < a; i++) + r[i] = yl(n[i], 0); + return [n, r, !0]; } - if (elements instanceof Int32Array) { - return [[], elements, false]; - } - return [[], new Int32Array(elements), false]; + return n instanceof Int32Array ? [[], n, !1] : [[], new Int32Array(n), !1]; } - ElementsAreEqual(originalIndex, newIndex) { - if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) { - return false; - } - return this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true; + ElementsAreEqual(t, n) { + return this._originalElementsOrHash[t] !== this._modifiedElementsOrHash[n] ? !1 : this._hasStrings ? this._originalStringElements[t] === this._modifiedStringElements[n] : !0; } - ElementsAreStrictEqual(originalIndex, newIndex) { - if (!this.ElementsAreEqual(originalIndex, newIndex)) { - return false; - } - const originalElement = LcsDiff._getStrictElement(this._originalSequence, originalIndex); - const modifiedElement = LcsDiff._getStrictElement(this._modifiedSequence, newIndex); - return originalElement === modifiedElement; + ElementsAreStrictEqual(t, n) { + if (!this.ElementsAreEqual(t, n)) + return !1; + const r = Qe._getStrictElement(this._originalSequence, t), i = Qe._getStrictElement(this._modifiedSequence, n); + return r === i; } - static _getStrictElement(sequence, index) { - if (typeof sequence.getStrictElement === "function") { - return sequence.getStrictElement(index); - } - return null; + static _getStrictElement(t, n) { + return typeof t.getStrictElement == "function" ? t.getStrictElement(n) : null; } - OriginalElementsAreEqual(index1, index2) { - if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) { - return false; - } - return this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true; + OriginalElementsAreEqual(t, n) { + return this._originalElementsOrHash[t] !== this._originalElementsOrHash[n] ? !1 : this._hasStrings ? this._originalStringElements[t] === this._originalStringElements[n] : !0; } - ModifiedElementsAreEqual(index1, index2) { - if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) { - return false; - } - return this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true; + ModifiedElementsAreEqual(t, n) { + return this._modifiedElementsOrHash[t] !== this._modifiedElementsOrHash[n] ? !1 : this._hasStrings ? this._modifiedStringElements[t] === this._modifiedStringElements[n] : !0; } - ComputeDiff(pretty) { - return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty); + ComputeDiff(t) { + return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, t); } - _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) { - const quitEarlyArr = [false]; - let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr); - if (pretty) { - changes = this.PrettifyChanges(changes); - } - return { - quitEarly: quitEarlyArr[0], - changes + _ComputeDiff(t, n, r, i, a) { + const o = [!1]; + let l = this.ComputeDiffRecursive(t, n, r, i, o); + return a && (l = this.PrettifyChanges(l)), { + quitEarly: o[0], + changes: l }; } - ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) { - quitEarlyArr[0] = false; - while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) { - originalStart++; - modifiedStart++; + ComputeDiffRecursive(t, n, r, i, a) { + for (a[0] = !1; t <= n && r <= i && this.ElementsAreEqual(t, r); ) + t++, r++; + for (; n >= t && i >= r && this.ElementsAreEqual(n, i); ) + n--, i--; + if (t > n || r > i) { + let p; + return r <= i ? (dt.Assert(t === n + 1, "originalStart should only be one more than originalEnd"), p = [ + new Ke(t, 0, r, i - r + 1) + ]) : t <= n ? (dt.Assert(r === i + 1, "modifiedStart should only be one more than modifiedEnd"), p = [ + new Ke(t, n - t + 1, r, 0) + ]) : (dt.Assert(t === n + 1, "originalStart should only be one more than originalEnd"), dt.Assert(r === i + 1, "modifiedStart should only be one more than modifiedEnd"), p = []), p; } - while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) { - originalEnd--; - modifiedEnd--; - } - if (originalStart > originalEnd || modifiedStart > modifiedEnd) { - let changes; - if (modifiedStart <= modifiedEnd) { - Debug.Assert(originalStart === originalEnd + 1, "originalStart should only be one more than originalEnd"); - changes = [ - new DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } else if (originalStart <= originalEnd) { - Debug.Assert(modifiedStart === modifiedEnd + 1, "modifiedStart should only be one more than modifiedEnd"); - changes = [ - new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0) - ]; - } else { - Debug.Assert(originalStart === originalEnd + 1, "originalStart should only be one more than originalEnd"); - Debug.Assert(modifiedStart === modifiedEnd + 1, "modifiedStart should only be one more than modifiedEnd"); - changes = []; - } - return changes; - } - const midOriginalArr = [0]; - const midModifiedArr = [0]; - const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr); - const midOriginal = midOriginalArr[0]; - const midModified = midModifiedArr[0]; - if (result !== null) { - return result; - } else if (!quitEarlyArr[0]) { - const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr); - let rightChanges = []; - if (!quitEarlyArr[0]) { - rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr); - } else { - rightChanges = [ - new DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1) - ]; - } - return this.ConcatenateChanges(leftChanges, rightChanges); + const o = [0], l = [0], h = this.ComputeRecursionPoint(t, n, r, i, o, l, a), c = o[0], d = l[0]; + if (h !== null) + return h; + if (!a[0]) { + const p = this.ComputeDiffRecursive(t, c, r, d, a); + let f = []; + return a[0] ? f = [ + new Ke(c + 1, n - (c + 1) + 1, d + 1, i - (d + 1) + 1) + ] : f = this.ComputeDiffRecursive(c + 1, n, d + 1, i, a), this.ConcatenateChanges(p, f); } return [ - new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1) + new Ke(t, n - t + 1, r, i - r + 1) ]; } - WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) { - let forwardChanges = null; - let reverseChanges = null; - let changeHelper = new DiffChangeHelper(); - let diagonalMin = diagonalForwardStart; - let diagonalMax = diagonalForwardEnd; - let diagonalRelative = midOriginalArr[0] - midModifiedArr[0] - diagonalForwardOffset; - let lastOriginalIndex = -1073741824; - let historyIndex = this.m_forwardHistory.length - 1; + WALKTRACE(t, n, r, i, a, o, l, h, c, d, p, f, g, w, b, y, A, C) { + let R = null, k = null, F = new Fi(), P = n, N = r, z = g[0] - y[0] - i, T = -1073741824, j = this.m_forwardHistory.length - 1; do { - const diagonal = diagonalRelative + diagonalForwardBase; - if (diagonal === diagonalMin || diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { - originalIndex = forwardPoints[diagonal + 1]; - modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; - if (originalIndex < lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex; - changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex); - diagonalRelative = diagonal + 1 - diagonalForwardBase; - } else { - originalIndex = forwardPoints[diagonal - 1] + 1; - modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; - if (originalIndex < lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex - 1; - changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1); - diagonalRelative = diagonal - 1 - diagonalForwardBase; + const U = z + t; + U === P || U < N && c[U - 1] < c[U + 1] ? (p = c[U + 1], w = p - z - i, p < T && F.MarkNextChange(), T = p, F.AddModifiedElement(p + 1, w), z = U + 1 - t) : (p = c[U - 1] + 1, w = p - z - i, p < T && F.MarkNextChange(), T = p - 1, F.AddOriginalElement(p, w + 1), z = U - 1 - t), j >= 0 && (c = this.m_forwardHistory[j], t = c[0], P = 1, N = c.length - 1); + } while (--j >= -1); + if (R = F.getReverseChanges(), C[0]) { + let U = g[0] + 1, O = y[0] + 1; + if (R !== null && R.length > 0) { + const re = R[R.length - 1]; + U = Math.max(U, re.getOriginalEnd()), O = Math.max(O, re.getModifiedEnd()); } - if (historyIndex >= 0) { - forwardPoints = this.m_forwardHistory[historyIndex]; - diagonalForwardBase = forwardPoints[0]; - diagonalMin = 1; - diagonalMax = forwardPoints.length - 1; - } - } while (--historyIndex >= -1); - forwardChanges = changeHelper.getReverseChanges(); - if (quitEarlyArr[0]) { - let originalStartPoint = midOriginalArr[0] + 1; - let modifiedStartPoint = midModifiedArr[0] + 1; - if (forwardChanges !== null && forwardChanges.length > 0) { - const lastForwardChange = forwardChanges[forwardChanges.length - 1]; - originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd()); - modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd()); - } - reverseChanges = [ - new DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1) + k = [ + new Ke(U, f - U + 1, O, b - O + 1) ]; } else { - changeHelper = new DiffChangeHelper(); - diagonalMin = diagonalReverseStart; - diagonalMax = diagonalReverseEnd; - diagonalRelative = midOriginalArr[0] - midModifiedArr[0] - diagonalReverseOffset; - lastOriginalIndex = 1073741824; - historyIndex = deltaIsEven ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; + F = new Fi(), P = o, N = l, z = g[0] - y[0] - h, T = 1073741824, j = A ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; do { - const diagonal = diagonalRelative + diagonalReverseBase; - if (diagonal === diagonalMin || diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1]) { - originalIndex = reversePoints[diagonal + 1] - 1; - modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset; - if (originalIndex > lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex + 1; - changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1); - diagonalRelative = diagonal + 1 - diagonalReverseBase; - } else { - originalIndex = reversePoints[diagonal - 1]; - modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset; - if (originalIndex > lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex; - changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1); - diagonalRelative = diagonal - 1 - diagonalReverseBase; - } - if (historyIndex >= 0) { - reversePoints = this.m_reverseHistory[historyIndex]; - diagonalReverseBase = reversePoints[0]; - diagonalMin = 1; - diagonalMax = reversePoints.length - 1; - } - } while (--historyIndex >= -1); - reverseChanges = changeHelper.getChanges(); + const U = z + a; + U === P || U < N && d[U - 1] >= d[U + 1] ? (p = d[U + 1] - 1, w = p - z - h, p > T && F.MarkNextChange(), T = p + 1, F.AddOriginalElement(p + 1, w + 1), z = U + 1 - a) : (p = d[U - 1], w = p - z - h, p > T && F.MarkNextChange(), T = p, F.AddModifiedElement(p + 1, w + 1), z = U - 1 - a), j >= 0 && (d = this.m_reverseHistory[j], a = d[0], P = 1, N = d.length - 1); + } while (--j >= -1); + k = F.getChanges(); } - return this.ConcatenateChanges(forwardChanges, reverseChanges); + return this.ConcatenateChanges(R, k); } - ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) { - let originalIndex = 0, modifiedIndex = 0; - let diagonalForwardStart = 0, diagonalForwardEnd = 0; - let diagonalReverseStart = 0, diagonalReverseEnd = 0; - originalStart--; - modifiedStart--; - midOriginalArr[0] = 0; - midModifiedArr[0] = 0; - this.m_forwardHistory = []; - this.m_reverseHistory = []; - const maxDifferences = originalEnd - originalStart + (modifiedEnd - modifiedStart); - const numDiagonals = maxDifferences + 1; - const forwardPoints = new Int32Array(numDiagonals); - const reversePoints = new Int32Array(numDiagonals); - const diagonalForwardBase = modifiedEnd - modifiedStart; - const diagonalReverseBase = originalEnd - originalStart; - const diagonalForwardOffset = originalStart - modifiedStart; - const diagonalReverseOffset = originalEnd - modifiedEnd; - const delta = diagonalReverseBase - diagonalForwardBase; - const deltaIsEven = delta % 2 === 0; - forwardPoints[diagonalForwardBase] = originalStart; - reversePoints[diagonalReverseBase] = originalEnd; - quitEarlyArr[0] = false; - for (let numDifferences = 1; numDifferences <= maxDifferences / 2 + 1; numDifferences++) { - let furthestOriginalIndex = 0; - let furthestModifiedIndex = 0; - diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals); - diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals); - for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) { - if (diagonal === diagonalForwardStart || diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { - originalIndex = forwardPoints[diagonal + 1]; - } else { - originalIndex = forwardPoints[diagonal - 1] + 1; - } - modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset; - const tempOriginalIndex = originalIndex; - while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) { - originalIndex++; - modifiedIndex++; - } - forwardPoints[diagonal] = originalIndex; - if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) { - furthestOriginalIndex = originalIndex; - furthestModifiedIndex = modifiedIndex; - } - if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= numDifferences - 1) { - if (originalIndex >= reversePoints[diagonal]) { - midOriginalArr[0] = originalIndex; - midModifiedArr[0] = modifiedIndex; - if (tempOriginalIndex <= reversePoints[diagonal] && 1447 > 0 && numDifferences <= 1447 + 1) { - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } else { - return null; - } - } - } + ComputeRecursionPoint(t, n, r, i, a, o, l) { + let h = 0, c = 0, d = 0, p = 0, f = 0, g = 0; + t--, r--, a[0] = 0, o[0] = 0, this.m_forwardHistory = [], this.m_reverseHistory = []; + const w = n - t + (i - r), b = w + 1, y = new Int32Array(b), A = new Int32Array(b), C = i - r, R = n - t, k = t - r, F = n - i, N = (R - C) % 2 === 0; + y[C] = t, A[R] = n, l[0] = !1; + for (let z = 1; z <= w / 2 + 1; z++) { + let T = 0, j = 0; + d = this.ClipDiagonalBound(C - z, z, C, b), p = this.ClipDiagonalBound(C + z, z, C, b); + for (let O = d; O <= p; O += 2) { + O === d || O < p && y[O - 1] < y[O + 1] ? h = y[O + 1] : h = y[O - 1] + 1, c = h - (O - C) - k; + const re = h; + for (; h < n && c < i && this.ElementsAreEqual(h + 1, c + 1); ) + h++, c++; + if (y[O] = h, h + c > T + j && (T = h, j = c), !N && Math.abs(O - R) <= z - 1 && h >= A[O]) + return a[0] = h, o[0] = c, re <= A[O] && 1447 > 0 && z <= 1447 + 1 ? this.WALKTRACE(C, d, p, k, R, f, g, F, y, A, h, n, a, c, i, o, N, l) : null; } - const matchLengthOfLongest = (furthestOriginalIndex - originalStart + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2; - if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) { - quitEarlyArr[0] = true; - midOriginalArr[0] = furthestOriginalIndex; - midModifiedArr[0] = furthestModifiedIndex; - if (matchLengthOfLongest > 0 && 1447 > 0 && numDifferences <= 1447 + 1) { - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } else { - originalStart++; - modifiedStart++; - return [ - new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } + const U = (T - t + (j - r) - z) / 2; + if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(T, U)) + return l[0] = !0, a[0] = T, o[0] = j, U > 0 && 1447 > 0 && z <= 1447 + 1 ? this.WALKTRACE(C, d, p, k, R, f, g, F, y, A, h, n, a, c, i, o, N, l) : (t++, r++, [ + new Ke(t, n - t + 1, r, i - r + 1) + ]); + f = this.ClipDiagonalBound(R - z, z, R, b), g = this.ClipDiagonalBound(R + z, z, R, b); + for (let O = f; O <= g; O += 2) { + O === f || O < g && A[O - 1] >= A[O + 1] ? h = A[O + 1] - 1 : h = A[O - 1], c = h - (O - R) - F; + const re = h; + for (; h > t && c > r && this.ElementsAreEqual(h, c); ) + h--, c--; + if (A[O] = h, N && Math.abs(O - C) <= z && h <= y[O]) + return a[0] = h, o[0] = c, re >= y[O] && 1447 > 0 && z <= 1447 + 1 ? this.WALKTRACE(C, d, p, k, R, f, g, F, y, A, h, n, a, c, i, o, N, l) : null; } - diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals); - diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals); - for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) { - if (diagonal === diagonalReverseStart || diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1]) { - originalIndex = reversePoints[diagonal + 1] - 1; - } else { - originalIndex = reversePoints[diagonal - 1]; - } - modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset; - const tempOriginalIndex = originalIndex; - while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) { - originalIndex--; - modifiedIndex--; - } - reversePoints[diagonal] = originalIndex; - if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) { - if (originalIndex <= forwardPoints[diagonal]) { - midOriginalArr[0] = originalIndex; - midModifiedArr[0] = modifiedIndex; - if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 > 0 && numDifferences <= 1447 + 1) { - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } else { - return null; - } - } - } - } - if (numDifferences <= 1447) { - let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2); - temp[0] = diagonalForwardBase - diagonalForwardStart + 1; - MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1); - this.m_forwardHistory.push(temp); - temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2); - temp[0] = diagonalReverseBase - diagonalReverseStart + 1; - MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1); - this.m_reverseHistory.push(temp); + if (z <= 1447) { + let O = new Int32Array(p - d + 2); + O[0] = C - d + 1, ut.Copy2(y, d, O, 1, p - d + 1), this.m_forwardHistory.push(O), O = new Int32Array(g - f + 2), O[0] = R - f + 1, ut.Copy2(A, f, O, 1, g - f + 1), this.m_reverseHistory.push(O); } } - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); + return this.WALKTRACE(C, d, p, k, R, f, g, F, y, A, h, n, a, c, i, o, N, l); } - PrettifyChanges(changes) { - for (let i = 0; i < changes.length; i++) { - const change = changes[i]; - const originalStop = i < changes.length - 1 ? changes[i + 1].originalStart : this._originalElementsOrHash.length; - const modifiedStop = i < changes.length - 1 ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length; - const checkOriginal = change.originalLength > 0; - const checkModified = change.modifiedLength > 0; - while (change.originalStart + change.originalLength < originalStop && change.modifiedStart + change.modifiedLength < modifiedStop && (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) && (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) { - const startStrictEqual = this.ElementsAreStrictEqual(change.originalStart, change.modifiedStart); - const endStrictEqual = this.ElementsAreStrictEqual(change.originalStart + change.originalLength, change.modifiedStart + change.modifiedLength); - if (endStrictEqual && !startStrictEqual) { + PrettifyChanges(t) { + for (let n = 0; n < t.length; n++) { + const r = t[n], i = n < t.length - 1 ? t[n + 1].originalStart : this._originalElementsOrHash.length, a = n < t.length - 1 ? t[n + 1].modifiedStart : this._modifiedElementsOrHash.length, o = r.originalLength > 0, l = r.modifiedLength > 0; + for (; r.originalStart + r.originalLength < i && r.modifiedStart + r.modifiedLength < a && (!o || this.OriginalElementsAreEqual(r.originalStart, r.originalStart + r.originalLength)) && (!l || this.ModifiedElementsAreEqual(r.modifiedStart, r.modifiedStart + r.modifiedLength)); ) { + const c = this.ElementsAreStrictEqual(r.originalStart, r.modifiedStart); + if (this.ElementsAreStrictEqual(r.originalStart + r.originalLength, r.modifiedStart + r.modifiedLength) && !c) break; - } - change.originalStart++; - change.modifiedStart++; + r.originalStart++, r.modifiedStart++; } - let mergedChangeArr = [null]; - if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) { - changes[i] = mergedChangeArr[0]; - changes.splice(i + 1, 1); - i--; + let h = [null]; + if (n < t.length - 1 && this.ChangesOverlap(t[n], t[n + 1], h)) { + t[n] = h[0], t.splice(n + 1, 1), n--; continue; } } - for (let i = changes.length - 1; i >= 0; i--) { - const change = changes[i]; - let originalStop = 0; - let modifiedStop = 0; - if (i > 0) { - const prevChange = changes[i - 1]; - originalStop = prevChange.originalStart + prevChange.originalLength; - modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength; + for (let n = t.length - 1; n >= 0; n--) { + const r = t[n]; + let i = 0, a = 0; + if (n > 0) { + const p = t[n - 1]; + i = p.originalStart + p.originalLength, a = p.modifiedStart + p.modifiedLength; } - const checkOriginal = change.originalLength > 0; - const checkModified = change.modifiedLength > 0; - let bestDelta = 0; - let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength); - for (let delta = 1; ; delta++) { - const originalStart = change.originalStart - delta; - const modifiedStart = change.modifiedStart - delta; - if (originalStart < originalStop || modifiedStart < modifiedStop) { + const o = r.originalLength > 0, l = r.modifiedLength > 0; + let h = 0, c = this._boundaryScore(r.originalStart, r.originalLength, r.modifiedStart, r.modifiedLength); + for (let p = 1; ; p++) { + const f = r.originalStart - p, g = r.modifiedStart - p; + if (f < i || g < a || o && !this.OriginalElementsAreEqual(f, f + r.originalLength) || l && !this.ModifiedElementsAreEqual(g, g + r.modifiedLength)) break; - } - if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) { - break; - } - if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) { - break; - } - const touchingPreviousChange = originalStart === originalStop && modifiedStart === modifiedStop; - const score = (touchingPreviousChange ? 5 : 0) + this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength); - if (score > bestScore) { - bestScore = score; - bestDelta = delta; - } + const b = (f === i && g === a ? 5 : 0) + this._boundaryScore(f, r.originalLength, g, r.modifiedLength); + b > c && (c = b, h = p); } - change.originalStart -= bestDelta; - change.modifiedStart -= bestDelta; - const mergedChangeArr = [null]; - if (i > 0 && this.ChangesOverlap(changes[i - 1], changes[i], mergedChangeArr)) { - changes[i - 1] = mergedChangeArr[0]; - changes.splice(i, 1); - i++; + r.originalStart -= h, r.modifiedStart -= h; + const d = [null]; + if (n > 0 && this.ChangesOverlap(t[n - 1], t[n], d)) { + t[n - 1] = d[0], t.splice(n, 1), n++; continue; } } - if (this._hasStrings) { - for (let i = 1, len = changes.length; i < len; i++) { - const aChange = changes[i - 1]; - const bChange = changes[i]; - const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength; - const aOriginalStart = aChange.originalStart; - const bOriginalEnd = bChange.originalStart + bChange.originalLength; - const abOriginalLength = bOriginalEnd - aOriginalStart; - const aModifiedStart = aChange.modifiedStart; - const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength; - const abModifiedLength = bModifiedEnd - aModifiedStart; - if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) { - const t = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength); - if (t) { - const [originalMatchStart, modifiedMatchStart] = t; - if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) { - aChange.originalLength = originalMatchStart - aChange.originalStart; - aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart; - bChange.originalStart = originalMatchStart + matchedLength; - bChange.modifiedStart = modifiedMatchStart + matchedLength; - bChange.originalLength = bOriginalEnd - bChange.originalStart; - bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart; - } + if (this._hasStrings) + for (let n = 1, r = t.length; n < r; n++) { + const i = t[n - 1], a = t[n], o = a.originalStart - i.originalStart - i.originalLength, l = i.originalStart, h = a.originalStart + a.originalLength, c = h - l, d = i.modifiedStart, p = a.modifiedStart + a.modifiedLength, f = p - d; + if (o < 5 && c < 20 && f < 20) { + const g = this._findBetterContiguousSequence(l, c, d, f, o); + if (g) { + const [w, b] = g; + (w !== i.originalStart + i.originalLength || b !== i.modifiedStart + i.modifiedLength) && (i.originalLength = w - i.originalStart, i.modifiedLength = b - i.modifiedStart, a.originalStart = w + o, a.modifiedStart = b + o, a.originalLength = h - a.originalStart, a.modifiedLength = p - a.modifiedStart); } } } - } - return changes; + return t; } - _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) { - if (originalLength < desiredLength || modifiedLength < desiredLength) { + _findBetterContiguousSequence(t, n, r, i, a) { + if (n < a || i < a) return null; - } - const originalMax = originalStart + originalLength - desiredLength + 1; - const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1; - let bestScore = 0; - let bestOriginalStart = 0; - let bestModifiedStart = 0; - for (let i = originalStart; i < originalMax; i++) { - for (let j = modifiedStart; j < modifiedMax; j++) { - const score = this._contiguousSequenceScore(i, j, desiredLength); - if (score > 0 && score > bestScore) { - bestScore = score; - bestOriginalStart = i; - bestModifiedStart = j; - } + const o = t + n - a + 1, l = r + i - a + 1; + let h = 0, c = 0, d = 0; + for (let p = t; p < o; p++) + for (let f = r; f < l; f++) { + const g = this._contiguousSequenceScore(p, f, a); + g > 0 && g > h && (h = g, c = p, d = f); } - } - if (bestScore > 0) { - return [bestOriginalStart, bestModifiedStart]; - } - return null; + return h > 0 ? [c, d] : null; } - _contiguousSequenceScore(originalStart, modifiedStart, length) { - let score = 0; - for (let l = 0; l < length; l++) { - if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) { + _contiguousSequenceScore(t, n, r) { + let i = 0; + for (let a = 0; a < r; a++) { + if (!this.ElementsAreEqual(t + a, n + a)) return 0; - } - score += this._originalStringElements[originalStart + l].length; + i += this._originalStringElements[t + a].length; } - return score; + return i; } - _OriginalIsBoundary(index) { - if (index <= 0 || index >= this._originalElementsOrHash.length - 1) { - return true; - } - return this._hasStrings && /^\s*$/.test(this._originalStringElements[index]); + _OriginalIsBoundary(t) { + return t <= 0 || t >= this._originalElementsOrHash.length - 1 ? !0 : this._hasStrings && /^\s*$/.test(this._originalStringElements[t]); } - _OriginalRegionIsBoundary(originalStart, originalLength) { - if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) { - return true; + _OriginalRegionIsBoundary(t, n) { + if (this._OriginalIsBoundary(t) || this._OriginalIsBoundary(t - 1)) + return !0; + if (n > 0) { + const r = t + n; + if (this._OriginalIsBoundary(r - 1) || this._OriginalIsBoundary(r)) + return !0; } - if (originalLength > 0) { - const originalEnd = originalStart + originalLength; - if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) { - return true; - } - } - return false; + return !1; } - _ModifiedIsBoundary(index) { - if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) { - return true; - } - return this._hasStrings && /^\s*$/.test(this._modifiedStringElements[index]); + _ModifiedIsBoundary(t) { + return t <= 0 || t >= this._modifiedElementsOrHash.length - 1 ? !0 : this._hasStrings && /^\s*$/.test(this._modifiedStringElements[t]); } - _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) { - if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) { - return true; + _ModifiedRegionIsBoundary(t, n) { + if (this._ModifiedIsBoundary(t) || this._ModifiedIsBoundary(t - 1)) + return !0; + if (n > 0) { + const r = t + n; + if (this._ModifiedIsBoundary(r - 1) || this._ModifiedIsBoundary(r)) + return !0; } - if (modifiedLength > 0) { - const modifiedEnd = modifiedStart + modifiedLength; - if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) { - return true; - } - } - return false; + return !1; } - _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) { - const originalScore = this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0; - const modifiedScore = this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0; - return originalScore + modifiedScore; + _boundaryScore(t, n, r, i) { + const a = this._OriginalRegionIsBoundary(t, n) ? 1 : 0, o = this._ModifiedRegionIsBoundary(r, i) ? 1 : 0; + return a + o; } - ConcatenateChanges(left, right) { - let mergedChangeArr = []; - if (left.length === 0 || right.length === 0) { - return right.length > 0 ? right : left; - } else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) { - const result = new Array(left.length + right.length - 1); - MyArray.Copy(left, 0, result, 0, left.length - 1); - result[left.length - 1] = mergedChangeArr[0]; - MyArray.Copy(right, 1, result, left.length, right.length - 1); - return result; + ConcatenateChanges(t, n) { + let r = []; + if (t.length === 0 || n.length === 0) + return n.length > 0 ? n : t; + if (this.ChangesOverlap(t[t.length - 1], n[0], r)) { + const i = new Array(t.length + n.length - 1); + return ut.Copy(t, 0, i, 0, t.length - 1), i[t.length - 1] = r[0], ut.Copy(n, 1, i, t.length, n.length - 1), i; } else { - const result = new Array(left.length + right.length); - MyArray.Copy(left, 0, result, 0, left.length); - MyArray.Copy(right, 0, result, left.length, right.length); - return result; + const i = new Array(t.length + n.length); + return ut.Copy(t, 0, i, 0, t.length), ut.Copy(n, 0, i, t.length, n.length), i; } } - ChangesOverlap(left, right, mergedChangeArr) { - Debug.Assert(left.originalStart <= right.originalStart, "Left change is not less than or equal to right change"); - Debug.Assert(left.modifiedStart <= right.modifiedStart, "Left change is not less than or equal to right change"); - if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) { - const originalStart = left.originalStart; - let originalLength = left.originalLength; - const modifiedStart = left.modifiedStart; - let modifiedLength = left.modifiedLength; - if (left.originalStart + left.originalLength >= right.originalStart) { - originalLength = right.originalStart + right.originalLength - left.originalStart; - } - if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) { - modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart; - } - mergedChangeArr[0] = new DiffChange(originalStart, originalLength, modifiedStart, modifiedLength); - return true; - } else { - mergedChangeArr[0] = null; - return false; - } + ChangesOverlap(t, n, r) { + if (dt.Assert(t.originalStart <= n.originalStart, "Left change is not less than or equal to right change"), dt.Assert(t.modifiedStart <= n.modifiedStart, "Left change is not less than or equal to right change"), t.originalStart + t.originalLength >= n.originalStart || t.modifiedStart + t.modifiedLength >= n.modifiedStart) { + const i = t.originalStart; + let a = t.originalLength; + const o = t.modifiedStart; + let l = t.modifiedLength; + return t.originalStart + t.originalLength >= n.originalStart && (a = n.originalStart + n.originalLength - t.originalStart), t.modifiedStart + t.modifiedLength >= n.modifiedStart && (l = n.modifiedStart + n.modifiedLength - t.modifiedStart), r[0] = new Ke(i, a, o, l), !0; + } else + return r[0] = null, !1; } - ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) { - if (diagonal >= 0 && diagonal < numDiagonals) { - return diagonal; - } - const diagonalsBelow = diagonalBaseIndex; - const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1; - const diffEven = numDifferences % 2 === 0; - if (diagonal < 0) { - const lowerBoundEven = diagonalsBelow % 2 === 0; - return diffEven === lowerBoundEven ? 0 : 1; + ClipDiagonalBound(t, n, r, i) { + if (t >= 0 && t < i) + return t; + const a = r, o = i - r - 1, l = n % 2 === 0; + if (t < 0) { + const h = a % 2 === 0; + return l === h ? 0 : 1; } else { - const upperBoundEven = diagonalsAbove % 2 === 0; - return diffEven === upperBoundEven ? numDiagonals - 1 : numDiagonals - 2; + const h = o % 2 === 0; + return l === h ? i - 1 : i - 2; } } } -let safeProcess; -if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== "undefined") { - const sandboxProcess = globals.vscode.process; - safeProcess = { +let St; +if (typeof fe.vscode < "u" && typeof fe.vscode.process < "u") { + const e = fe.vscode.process; + St = { get platform() { - return sandboxProcess.platform; + return e.platform; }, get arch() { - return sandboxProcess.arch; + return e.arch; }, get env() { - return sandboxProcess.env; + return e.env; }, cwd() { - return sandboxProcess.cwd(); + return e.cwd(); } }; -} else if (typeof process !== "undefined") { - safeProcess = { +} else + typeof process < "u" ? St = { get platform() { return process.platform; }, @@ -2110,16 +1392,13 @@ if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== " return process.env; }, cwd() { - return process.env["VSCODE_CWD"] || process.cwd(); + return process.env.VSCODE_CWD || process.cwd(); } - }; -} else { - safeProcess = { + } : St = { get platform() { - return isWindows ? "win32" : isMacintosh ? "darwin" : "linux"; + return Bt ? "win32" : Jo ? "darwin" : "linux"; }, get arch() { - return void 0; }, get env() { return {}; @@ -2128,1253 +1407,642 @@ if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== " return "/"; } }; -} -const cwd = safeProcess.cwd; -const env = safeProcess.env; -const platform = safeProcess.platform; -const CHAR_UPPERCASE_A = 65; -const CHAR_LOWERCASE_A = 97; -const CHAR_UPPERCASE_Z = 90; -const CHAR_LOWERCASE_Z = 122; -const CHAR_DOT = 46; -const CHAR_FORWARD_SLASH = 47; -const CHAR_BACKWARD_SLASH = 92; -const CHAR_COLON = 58; -const CHAR_QUESTION_MARK = 63; -class ErrorInvalidArgType extends Error { - constructor(name, expected, actual) { - let determiner; - if (typeof expected === "string" && expected.indexOf("not ") === 0) { - determiner = "must not be"; - expected = expected.replace(/^not /, ""); - } else { - determiner = "must be"; - } - const type = name.indexOf(".") !== -1 ? "property" : "argument"; - let msg = `The "${name}" ${type} ${determiner} of type ${expected}`; - msg += `. Received type ${typeof actual}`; - super(msg); - this.code = "ERR_INVALID_ARG_TYPE"; - } -} -function validateString(value, name) { - if (typeof value !== "string") { - throw new ErrorInvalidArgType(name, "string", value); - } -} -function isPathSeparator(code) { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -} -function isPosixPathSeparator(code) { - return code === CHAR_FORWARD_SLASH; -} -function isWindowsDeviceRoot(code) { - return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z || code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z; -} -function normalizeString(path, allowAboveRoot, separator, isPathSeparator2) { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code = 0; - for (let i = 0; i <= path.length; ++i) { - if (i < path.length) { - code = path.charCodeAt(i); - } else if (isPathSeparator2(code)) { - break; - } else { - code = CHAR_FORWARD_SLASH; - } - if (isPathSeparator2(code)) { - if (lastSlash === i - 1 || dots === 1) - ; - else if (dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length !== 0) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - res += res.length > 0 ? `${separator}..` : ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) { - res += `${separator}${path.slice(lastSlash + 1, i)}`; - } else { - res = path.slice(lastSlash + 1, i); - } - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} -function _format(sep, pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new ErrorInvalidArgType("pathObject", "Object", pathObject); - } - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || `${pathObject.name || ""}${pathObject.ext || ""}`; - if (!dir) { - return base; - } - return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`; -} -const win32 = { - resolve(...pathSegments) { - let resolvedDevice = ""; - let resolvedTail = ""; - let resolvedAbsolute = false; - for (let i = pathSegments.length - 1; i >= -1; i--) { - let path; - if (i >= 0) { - path = pathSegments[i]; - validateString(path, "path"); - if (path.length === 0) { - continue; - } - } else if (resolvedDevice.length === 0) { - path = cwd(); - } else { - path = env[`=${resolvedDevice}`] || cwd(); - if (path === void 0 || path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() && path.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - path = `${resolvedDevice}\\`; - } - } - const len = path.length; - let rootEnd = 0; - let device = ""; - let isAbsolute = false; - const code = path.charCodeAt(0); - if (len === 1) { - if (isPathSeparator(code)) { - rootEnd = 1; - isAbsolute = true; - } - } else if (isPathSeparator(code)) { - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len || j !== last) { - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { - isAbsolute = true; - rootEnd = 3; - } - } - if (device.length > 0) { - if (resolvedDevice.length > 0) { - if (device.toLowerCase() !== resolvedDevice.toLowerCase()) { - continue; - } - } else { - resolvedDevice = device; - } - } - if (resolvedAbsolute) { - if (resolvedDevice.length > 0) { - break; - } - } else { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - if (isAbsolute && resolvedDevice.length > 0) { - break; - } - } - } - resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); - return resolvedAbsolute ? `${resolvedDevice}\\${resolvedTail}` : `${resolvedDevice}${resolvedTail}` || "."; - }, - normalize(path) { - validateString(path, "path"); - const len = path.length; - if (len === 0) { - return "."; - } - let rootEnd = 0; - let device; - let isAbsolute = false; - const code = path.charCodeAt(0); - if (len === 1) { - return isPosixPathSeparator(code) ? "\\" : path; - } - if (isPathSeparator(code)) { - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - return `\\\\${firstPart}\\${path.slice(last)}\\`; - } - if (j !== last) { - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { - isAbsolute = true; - rootEnd = 3; - } - } - let tail = rootEnd < len ? normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator) : ""; - if (tail.length === 0 && !isAbsolute) { - tail = "."; - } - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { - tail += "\\"; - } - if (device === void 0) { - return isAbsolute ? `\\${tail}` : tail; - } - return isAbsolute ? `${device}\\${tail}` : `${device}${tail}`; - }, - isAbsolute(path) { - validateString(path, "path"); - const len = path.length; - if (len === 0) { - return false; - } - const code = path.charCodeAt(0); - return isPathSeparator(code) || len > 2 && isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON && isPathSeparator(path.charCodeAt(2)); - }, - join(...paths) { - if (paths.length === 0) { - return "."; - } - let joined; - let firstPart; - for (let i = 0; i < paths.length; ++i) { - const arg = paths[i]; - validateString(arg, "path"); - if (arg.length > 0) { - if (joined === void 0) { - joined = firstPart = arg; - } else { - joined += `\\${arg}`; - } - } - } - if (joined === void 0) { - return "."; - } - let needsReplace = true; - let slashCount = 0; - if (typeof firstPart === "string" && isPathSeparator(firstPart.charCodeAt(0))) { - ++slashCount; - const firstLen = firstPart.length; - if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) { - ++slashCount; - if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) { - ++slashCount; - } else { - needsReplace = false; - } - } - } - } - if (needsReplace) { - while (slashCount < joined.length && isPathSeparator(joined.charCodeAt(slashCount))) { - slashCount++; - } - if (slashCount >= 2) { - joined = `\\${joined.slice(slashCount)}`; - } - } - return win32.normalize(joined); - }, - relative(from, to) { - validateString(from, "from"); - validateString(to, "to"); - if (from === to) { - return ""; - } - const fromOrig = win32.resolve(from); - const toOrig = win32.resolve(to); - if (fromOrig === toOrig) { - return ""; - } - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - if (from === to) { - return ""; - } - let fromStart = 0; - while (fromStart < from.length && from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) { - fromStart++; - } - let fromEnd = from.length; - while (fromEnd - 1 > fromStart && from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) { - fromEnd--; - } - const fromLen = fromEnd - fromStart; - let toStart = 0; - while (toStart < to.length && to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { - toStart++; - } - let toEnd = to.length; - while (toEnd - 1 > toStart && to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) { - toEnd--; - } - const toLen = toEnd - toStart; - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) { - break; - } else if (fromCode === CHAR_BACKWARD_SLASH) { - lastCommonSep = i; - } - } - if (i !== length) { - if (lastCommonSep === -1) { - return toOrig; - } - } else { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { - return toOrig.slice(toStart + i + 1); - } - if (i === 2) { - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { - lastCommonSep = i; - } else if (i === 2) { - lastCommonSep = 3; - } - } - if (lastCommonSep === -1) { - lastCommonSep = 0; - } - } - let out = ""; - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { - out += out.length === 0 ? ".." : "\\.."; - } - } - toStart += lastCommonSep; - if (out.length > 0) { - return `${out}${toOrig.slice(toStart, toEnd)}`; - } - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { - ++toStart; - } - return toOrig.slice(toStart, toEnd); - }, - toNamespacedPath(path) { - if (typeof path !== "string") { - return path; - } - if (path.length === 0) { - return ""; - } - const resolvedPath = win32.resolve(path); - if (resolvedPath.length <= 2) { - return path; - } - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); - if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) && resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - return `\\\\?\\${resolvedPath}`; - } - return path; - }, - dirname(path) { - validateString(path, "path"); - const len = path.length; - if (len === 0) { - return "."; - } - let rootEnd = -1; - let offset = 0; - const code = path.charCodeAt(0); - if (len === 1) { - return isPathSeparator(code) ? path : "."; - } - if (isPathSeparator(code)) { - rootEnd = offset = 1; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - return path; - } - if (j !== last) { - rootEnd = offset = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2; - offset = rootEnd; - } - let end = -1; - let matchedSlash = true; - for (let i = len - 1; i >= offset; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; - } - } else { - matchedSlash = false; - } - } - if (end === -1) { - if (rootEnd === -1) { - return "."; - } - end = rootEnd; - } - return path.slice(0, end); - }, - basename(path, ext) { - if (ext !== void 0) { - validateString(ext, "ext"); - } - validateString(path, "path"); - let start = 0; - let end = -1; - let matchedSlash = true; +const fr = St.cwd, xl = St.env, ht = St.platform, Sl = 65, Cl = 97, kl = 90, Fl = 122, nt = 46, he = 47, ye = 92, Je = 58, _l = 63; +class Ys extends Error { + constructor(t, n, r) { let i; - if (path.length >= 2 && isWindowsDeviceRoot(path.charCodeAt(0)) && path.charCodeAt(1) === CHAR_COLON) { - start = 2; + typeof n == "string" && n.indexOf("not ") === 0 ? (i = "must not be", n = n.replace(/^not /, "")) : i = "must be"; + const a = t.indexOf(".") !== -1 ? "property" : "argument"; + let o = `The "${t}" ${a} ${i} of type ${n}`; + o += `. Received type ${typeof r}`, super(o), this.code = "ERR_INVALID_ARG_TYPE"; + } +} +function ie(e, t) { + if (typeof e != "string") + throw new Ys(t, "string", e); +} +function q(e) { + return e === he || e === ye; +} +function mr(e) { + return e === he; +} +function Xe(e) { + return e >= Sl && e <= kl || e >= Cl && e <= Fl; +} +function xn(e, t, n, r) { + let i = "", a = 0, o = -1, l = 0, h = 0; + for (let c = 0; c <= e.length; ++c) { + if (c < e.length) + h = e.charCodeAt(c); + else { + if (r(h)) + break; + h = he; } - if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) { - if (ext === path) { - return ""; + if (r(h)) { + if (!(o === c - 1 || l === 1)) + if (l === 2) { + if (i.length < 2 || a !== 2 || i.charCodeAt(i.length - 1) !== nt || i.charCodeAt(i.length - 2) !== nt) { + if (i.length > 2) { + const d = i.lastIndexOf(n); + d === -1 ? (i = "", a = 0) : (i = i.slice(0, d), a = i.length - 1 - i.lastIndexOf(n)), o = c, l = 0; + continue; + } else if (i.length !== 0) { + i = "", a = 0, o = c, l = 0; + continue; + } + } + t && (i += i.length > 0 ? `${n}..` : "..", a = 2); + } else + i.length > 0 ? i += `${n}${e.slice(o + 1, c)}` : i = e.slice(o + 1, c), a = c - o - 1; + o = c, l = 0; + } else + h === nt && l !== -1 ? ++l : l = -1; + } + return i; +} +function Ks(e, t) { + if (t === null || typeof t != "object") + throw new Ys("pathObject", "Object", t); + const n = t.dir || t.root, r = t.base || `${t.name || ""}${t.ext || ""}`; + return n ? n === t.root ? `${n}${r}` : `${n}${e}${r}` : r; +} +const ve = { + resolve(...e) { + let t = "", n = "", r = !1; + for (let i = e.length - 1; i >= -1; i--) { + let a; + if (i >= 0) { + if (a = e[i], ie(a, "path"), a.length === 0) + continue; + } else + t.length === 0 ? a = fr() : (a = xl[`=${t}`] || fr(), (a === void 0 || a.slice(0, 2).toLowerCase() !== t.toLowerCase() && a.charCodeAt(2) === ye) && (a = `${t}\\`)); + const o = a.length; + let l = 0, h = "", c = !1; + const d = a.charCodeAt(0); + if (o === 1) + q(d) && (l = 1, c = !0); + else if (q(d)) + if (c = !0, q(a.charCodeAt(1))) { + let p = 2, f = p; + for (; p < o && !q(a.charCodeAt(p)); ) + p++; + if (p < o && p !== f) { + const g = a.slice(f, p); + for (f = p; p < o && q(a.charCodeAt(p)); ) + p++; + if (p < o && p !== f) { + for (f = p; p < o && !q(a.charCodeAt(p)); ) + p++; + (p === o || p !== f) && (h = `\\\\${g}\\${a.slice(f, p)}`, l = p); + } + } + } else + l = 1; + else + Xe(d) && a.charCodeAt(1) === Je && (h = a.slice(0, 2), l = 2, o > 2 && q(a.charCodeAt(2)) && (c = !0, l = 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 = `${a.slice(l)}\\${n}`, r = c, c && t.length > 0) + break; + } + return n = xn(n, !r, "\\", q), r ? `${t}\\${n}` : `${t}${n}` || "."; + }, + normalize(e) { + ie(e, "path"); + const t = e.length; + if (t === 0) + return "."; + let n = 0, r, i = !1; + const a = e.charCodeAt(0); + if (t === 1) + return mr(a) ? "\\" : e; + if (q(a)) + if (i = !0, q(e.charCodeAt(1))) { + let l = 2, h = l; + for (; l < t && !q(e.charCodeAt(l)); ) + l++; + if (l < t && l !== h) { + const c = e.slice(h, l); + for (h = l; l < t && q(e.charCodeAt(l)); ) + l++; + if (l < t && l !== h) { + for (h = l; l < t && !q(e.charCodeAt(l)); ) + l++; + if (l === t) + return `\\\\${c}\\${e.slice(h)}\\`; + l !== h && (r = `\\\\${c}\\${e.slice(h, l)}`, n = l); + } + } + } else + n = 1; + else + Xe(a) && e.charCodeAt(1) === Je && (r = e.slice(0, 2), n = 2, t > 2 && q(e.charCodeAt(2)) && (i = !0, n = 3)); + let o = n < t ? xn(e.slice(n), !i, "\\", q) : ""; + return o.length === 0 && !i && (o = "."), o.length > 0 && q(e.charCodeAt(t - 1)) && (o += "\\"), r === void 0 ? i ? `\\${o}` : o : i ? `${r}\\${o}` : `${r}${o}`; + }, + isAbsolute(e) { + ie(e, "path"); + const t = e.length; + if (t === 0) + return !1; + const n = e.charCodeAt(0); + return q(n) || t > 2 && Xe(n) && e.charCodeAt(1) === Je && q(e.charCodeAt(2)); + }, + join(...e) { + if (e.length === 0) + return "."; + let t, n; + for (let a = 0; a < e.length; ++a) { + const o = e[a]; + ie(o, "path"), o.length > 0 && (t === void 0 ? t = n = o : t += `\\${o}`); + } + if (t === void 0) + return "."; + let r = !0, i = 0; + if (typeof n == "string" && q(n.charCodeAt(0))) { + ++i; + const a = n.length; + a > 1 && q(n.charCodeAt(1)) && (++i, a > 2 && (q(n.charCodeAt(2)) ? ++i : r = !1)); + } + if (r) { + for (; i < t.length && q(t.charCodeAt(i)); ) + i++; + i >= 2 && (t = `\\${t.slice(i)}`); + } + return ve.normalize(t); + }, + relative(e, t) { + if (ie(e, "from"), ie(t, "to"), e === t) + return ""; + const n = ve.resolve(e), r = ve.resolve(t); + if (n === r || (e = n.toLowerCase(), t = r.toLowerCase(), e === t)) + return ""; + let i = 0; + for (; i < e.length && e.charCodeAt(i) === ye; ) + i++; + let a = e.length; + for (; a - 1 > i && e.charCodeAt(a - 1) === ye; ) + a--; + const o = a - i; + let l = 0; + for (; l < t.length && t.charCodeAt(l) === ye; ) + l++; + let h = t.length; + for (; h - 1 > l && t.charCodeAt(h - 1) === ye; ) + h--; + const c = h - l, d = o < c ? o : c; + let p = -1, f = 0; + for (; f < d; f++) { + const w = e.charCodeAt(i + f); + if (w !== t.charCodeAt(l + f)) + break; + w === ye && (p = f); + } + if (f !== d) { + if (p === -1) + return r; + } else { + if (c > d) { + if (t.charCodeAt(l + f) === ye) + return r.slice(l + f + 1); + if (f === 2) + return r.slice(l + f); } - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - start = i + 1; + o > d && (e.charCodeAt(i + f) === ye ? p = f : f === 2 && (p = 3)), p === -1 && (p = 0); + } + let g = ""; + for (f = i + p + 1; f <= a; ++f) + (f === a || e.charCodeAt(f) === ye) && (g += g.length === 0 ? ".." : "\\.."); + return l += p, g.length > 0 ? `${g}${r.slice(l, h)}` : (r.charCodeAt(l) === ye && ++l, r.slice(l, h)); + }, + toNamespacedPath(e) { + if (typeof e != "string") + return e; + if (e.length === 0) + return ""; + const t = ve.resolve(e); + if (t.length <= 2) + return e; + if (t.charCodeAt(0) === ye) { + if (t.charCodeAt(1) === ye) { + const n = t.charCodeAt(2); + if (n !== _l && n !== nt) + return `\\\\?\\UNC\\${t.slice(2)}`; + } + } else if (Xe(t.charCodeAt(0)) && t.charCodeAt(1) === Je && t.charCodeAt(2) === ye) + return `\\\\?\\${t}`; + return e; + }, + dirname(e) { + ie(e, "path"); + const t = e.length; + if (t === 0) + return "."; + let n = -1, r = 0; + const i = e.charCodeAt(0); + if (t === 1) + return q(i) ? e : "."; + if (q(i)) { + if (n = r = 1, q(e.charCodeAt(1))) { + let l = 2, h = l; + for (; l < t && !q(e.charCodeAt(l)); ) + l++; + if (l < t && l !== h) { + for (h = l; l < t && q(e.charCodeAt(l)); ) + l++; + if (l < t && l !== h) { + for (h = l; l < t && !q(e.charCodeAt(l)); ) + l++; + if (l === t) + return e; + l !== h && (n = r = l + 1); + } + } + } + } else + Xe(i) && e.charCodeAt(1) === Je && (n = t > 2 && q(e.charCodeAt(2)) ? 3 : 2, r = n); + let a = -1, o = !0; + for (let l = t - 1; l >= r; --l) + if (q(e.charCodeAt(l))) { + if (!o) { + a = l; + break; + } + } else + o = !1; + if (a === -1) { + if (n === -1) + return "."; + a = n; + } + return e.slice(0, a); + }, + basename(e, t) { + t !== void 0 && ie(t, "ext"), ie(e, "path"); + let n = 0, r = -1, i = !0, a; + if (e.length >= 2 && Xe(e.charCodeAt(0)) && e.charCodeAt(1) === Je && (n = 2), t !== void 0 && t.length > 0 && t.length <= e.length) { + if (t === e) + return ""; + let o = t.length - 1, l = -1; + for (a = e.length - 1; a >= n; --a) { + const h = e.charCodeAt(a); + if (q(h)) { + if (!i) { + n = a + 1; break; } - } else { - if (firstNonSlashEnd === -1) { - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - end = i; - } - } else { - extIdx = -1; - end = firstNonSlashEnd; - } - } - } + } else + l === -1 && (i = !1, l = a + 1), o >= 0 && (h === t.charCodeAt(o) ? --o === -1 && (r = a) : (o = -1, r = l)); } - if (start === end) { - end = firstNonSlashEnd; - } else if (end === -1) { - end = path.length; - } - return path.slice(start, end); + return n === r ? r = l : r === -1 && (r = e.length), e.slice(n, r); } - for (i = path.length - 1; i >= start; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - start = i + 1; + for (a = e.length - 1; a >= n; --a) + if (q(e.charCodeAt(a))) { + if (!i) { + n = a + 1; break; } - } else if (end === -1) { - matchedSlash = false; - end = i + 1; - } - } - if (end === -1) { - return ""; - } - return path.slice(start, end); + } else + r === -1 && (i = !1, r = a + 1); + return r === -1 ? "" : e.slice(n, r); }, - extname(path) { - validateString(path, "path"); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let preDotState = 0; - if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) { - start = startPart = 2; - } - for (let i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - startPart = i + 1; + extname(e) { + ie(e, "path"); + let t = 0, n = -1, r = 0, i = -1, a = !0, o = 0; + e.length >= 2 && e.charCodeAt(1) === Je && Xe(e.charCodeAt(0)) && (t = r = 2); + for (let l = e.length - 1; l >= t; --l) { + const h = e.charCodeAt(l); + if (q(h)) { + if (!a) { + r = l + 1; break; } continue; } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } + i === -1 && (a = !1, i = l + 1), h === nt ? n === -1 ? n = l : o !== 1 && (o = 1) : n !== -1 && (o = -1); } - if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); + return n === -1 || i === -1 || o === 0 || o === 1 && n === i - 1 && n === r + 1 ? "" : e.slice(n, i); }, - format: _format.bind(null, "\\"), - parse(path) { - validateString(path, "path"); - const ret = { root: "", dir: "", base: "", ext: "", name: "" }; - if (path.length === 0) { - return ret; - } - const len = path.length; - let rootEnd = 0; - let code = path.charCodeAt(0); - if (len === 1) { - if (isPathSeparator(code)) { - ret.root = ret.dir = path; - return ret; - } - ret.base = ret.name = path; - return ret; - } - if (isPathSeparator(code)) { - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - rootEnd = j; - } else if (j !== last) { - rootEnd = j + 1; - } + format: Ks.bind(null, "\\"), + parse(e) { + ie(e, "path"); + const t = { root: "", dir: "", base: "", ext: "", name: "" }; + if (e.length === 0) + return t; + const n = e.length; + let r = 0, i = e.charCodeAt(0); + if (n === 1) + return q(i) ? (t.root = t.dir = e, t) : (t.base = t.name = e, t); + if (q(i)) { + if (r = 1, q(e.charCodeAt(1))) { + let p = 2, f = p; + for (; p < n && !q(e.charCodeAt(p)); ) + p++; + if (p < n && p !== f) { + for (f = p; p < n && q(e.charCodeAt(p)); ) + p++; + if (p < n && p !== f) { + for (f = p; p < n && !q(e.charCodeAt(p)); ) + p++; + p === n ? r = p : p !== f && (r = p + 1); } } } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - if (len <= 2) { - ret.root = ret.dir = path; - return ret; - } - rootEnd = 2; - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - ret.root = ret.dir = path; - return ret; - } - rootEnd = 3; + } else if (Xe(i) && e.charCodeAt(1) === Je) { + if (n <= 2) + return t.root = t.dir = e, t; + if (r = 2, q(e.charCodeAt(2))) { + if (n === 3) + return t.root = t.dir = e, t; + r = 3; } } - if (rootEnd > 0) { - ret.root = path.slice(0, rootEnd); - } - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - let preDotState = 0; - for (; i >= rootEnd; --i) { - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - startPart = i + 1; + r > 0 && (t.root = e.slice(0, r)); + let a = -1, o = r, l = -1, h = !0, c = e.length - 1, d = 0; + for (; c >= r; --c) { + if (i = e.charCodeAt(c), q(i)) { + if (!h) { + o = c + 1; break; } continue; } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } + l === -1 && (h = !1, l = c + 1), i === nt ? a === -1 ? a = c : d !== 1 && (d = 1) : a !== -1 && (d = -1); } - if (end !== -1) { - if (startDot === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - ret.base = ret.name = path.slice(startPart, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); - } - } - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } else { - ret.dir = ret.root; - } - return ret; + return l !== -1 && (a === -1 || d === 0 || d === 1 && a === l - 1 && a === o + 1 ? t.base = t.name = e.slice(o, l) : (t.name = e.slice(o, a), t.base = e.slice(o, l), t.ext = e.slice(a, l))), o > 0 && o !== r ? t.dir = e.slice(0, o - 1) : t.dir = t.root, t; }, sep: "\\", delimiter: ";", win32: null, posix: null -}; -const posix = { - resolve(...pathSegments) { - let resolvedPath = ""; - let resolvedAbsolute = false; - for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - const path = i >= 0 ? pathSegments[i] : cwd(); - validateString(path, "path"); - if (path.length === 0) { - continue; - } - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; +}, xe = { + resolve(...e) { + let t = "", n = !1; + for (let r = e.length - 1; r >= -1 && !n; r--) { + const i = r >= 0 ? e[r] : fr(); + ie(i, "path"), i.length !== 0 && (t = `${i}/${t}`, n = i.charCodeAt(0) === he); } - resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); - if (resolvedAbsolute) { - return `/${resolvedPath}`; - } - return resolvedPath.length > 0 ? resolvedPath : "."; + return t = xn(t, !n, "/", mr), n ? `/${t}` : t.length > 0 ? t : "."; }, - normalize(path) { - validateString(path, "path"); - if (path.length === 0) { + normalize(e) { + if (ie(e, "path"), e.length === 0) return "."; - } - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; - path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); - if (path.length === 0) { - if (isAbsolute) { - return "/"; - } - return trailingSeparator ? "./" : "."; - } - if (trailingSeparator) { - path += "/"; - } - return isAbsolute ? `/${path}` : path; + const t = e.charCodeAt(0) === he, n = e.charCodeAt(e.length - 1) === he; + return e = xn(e, !t, "/", mr), e.length === 0 ? t ? "/" : n ? "./" : "." : (n && (e += "/"), t ? `/${e}` : e); }, - isAbsolute(path) { - validateString(path, "path"); - return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH; + isAbsolute(e) { + return ie(e, "path"), e.length > 0 && e.charCodeAt(0) === he; }, - join(...paths) { - if (paths.length === 0) { + join(...e) { + if (e.length === 0) return "."; + let t; + for (let n = 0; n < e.length; ++n) { + const r = e[n]; + ie(r, "path"), r.length > 0 && (t === void 0 ? t = r : t += `/${r}`); } - let joined; - for (let i = 0; i < paths.length; ++i) { - const arg = paths[i]; - validateString(arg, "path"); - if (arg.length > 0) { - if (joined === void 0) { - joined = arg; - } else { - joined += `/${arg}`; - } - } - } - if (joined === void 0) { - return "."; - } - return posix.normalize(joined); + return t === void 0 ? "." : xe.normalize(t); }, - relative(from, to) { - validateString(from, "from"); - validateString(to, "to"); - if (from === to) { + relative(e, t) { + if (ie(e, "from"), ie(t, "to"), e === t || (e = xe.resolve(e), t = xe.resolve(t), e === t)) return ""; - } - from = posix.resolve(from); - to = posix.resolve(to); - if (from === to) { - return ""; - } - const fromStart = 1; - const fromEnd = from.length; - const fromLen = fromEnd - fromStart; - const toStart = 1; - const toLen = to.length - toStart; - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) { + const n = 1, r = e.length, i = r - n, a = 1, o = t.length - a, l = i < o ? i : o; + let h = -1, c = 0; + for (; c < l; c++) { + const p = e.charCodeAt(n + c); + if (p !== t.charCodeAt(a + c)) break; - } else if (fromCode === CHAR_FORWARD_SLASH) { - lastCommonSep = i; - } + p === he && (h = c); } - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) { - return to.slice(toStart + i + 1); - } - if (i === 0) { - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { - lastCommonSep = i; - } else if (i === 0) { - lastCommonSep = 0; - } - } - } - let out = ""; - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) { - out += out.length === 0 ? ".." : "/.."; - } - } - return `${out}${to.slice(toStart + lastCommonSep)}`; + if (c === l) + if (o > l) { + if (t.charCodeAt(a + c) === he) + return t.slice(a + c + 1); + if (c === 0) + return t.slice(a + c); + } else + i > l && (e.charCodeAt(n + c) === he ? h = c : c === 0 && (h = 0)); + let d = ""; + for (c = n + h + 1; c <= r; ++c) + (c === r || e.charCodeAt(c) === he) && (d += d.length === 0 ? ".." : "/.."); + return `${d}${t.slice(a + h)}`; }, - toNamespacedPath(path) { - return path; + toNamespacedPath(e) { + return e; }, - dirname(path) { - validateString(path, "path"); - if (path.length === 0) { + dirname(e) { + if (ie(e, "path"), e.length === 0) return "."; - } - const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let end = -1; - let matchedSlash = true; - for (let i = path.length - 1; i >= 1; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - end = i; + const t = e.charCodeAt(0) === he; + let n = -1, r = !0; + for (let i = e.length - 1; i >= 1; --i) + if (e.charCodeAt(i) === he) { + if (!r) { + n = i; break; } - } else { - matchedSlash = false; - } - } - if (end === -1) { - return hasRoot ? "/" : "."; - } - if (hasRoot && end === 1) { - return "//"; - } - return path.slice(0, end); + } else + r = !1; + return n === -1 ? t ? "/" : "." : t && n === 1 ? "//" : e.slice(0, n); }, - basename(path, ext) { - if (ext !== void 0) { - validateString(ext, "ext"); - } - validateString(path, "path"); - let start = 0; - let end = -1; - let matchedSlash = true; - let i; - if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) { - if (ext === path) { + basename(e, t) { + t !== void 0 && ie(t, "ext"), ie(e, "path"); + let n = 0, r = -1, i = !0, a; + if (t !== void 0 && t.length > 0 && t.length <= e.length) { + if (t === e) return ""; - } - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - start = i + 1; + let o = t.length - 1, l = -1; + for (a = e.length - 1; a >= 0; --a) { + const h = e.charCodeAt(a); + if (h === he) { + if (!i) { + n = a + 1; break; } - } else { - if (firstNonSlashEnd === -1) { - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - end = i; - } - } else { - extIdx = -1; - end = firstNonSlashEnd; - } - } - } + } else + l === -1 && (i = !1, l = a + 1), o >= 0 && (h === t.charCodeAt(o) ? --o === -1 && (r = a) : (o = -1, r = l)); } - if (start === end) { - end = firstNonSlashEnd; - } else if (end === -1) { - end = path.length; - } - return path.slice(start, end); + return n === r ? r = l : r === -1 && (r = e.length), e.slice(n, r); } - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - start = i + 1; + for (a = e.length - 1; a >= 0; --a) + if (e.charCodeAt(a) === he) { + if (!i) { + n = a + 1; break; } - } else if (end === -1) { - matchedSlash = false; - end = i + 1; - } - } - if (end === -1) { - return ""; - } - return path.slice(start, end); + } else + r === -1 && (i = !1, r = a + 1); + return r === -1 ? "" : e.slice(n, r); }, - extname(path) { - validateString(path, "path"); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let preDotState = 0; - for (let i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - startPart = i + 1; + extname(e) { + ie(e, "path"); + let t = -1, n = 0, r = -1, i = !0, a = 0; + for (let o = e.length - 1; o >= 0; --o) { + const l = e.charCodeAt(o); + if (l === he) { + if (!i) { + n = o + 1; break; } continue; } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } + r === -1 && (i = !1, r = o + 1), l === nt ? t === -1 ? t = o : a !== 1 && (a = 1) : t !== -1 && (a = -1); } - if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); + return t === -1 || r === -1 || a === 0 || a === 1 && t === r - 1 && t === n + 1 ? "" : e.slice(t, r); }, - format: _format.bind(null, "/"), - parse(path) { - validateString(path, "path"); - const ret = { root: "", dir: "", base: "", ext: "", name: "" }; - if (path.length === 0) { - return ret; - } - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let start; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - let preDotState = 0; - for (; i >= start; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - startPart = i + 1; + format: Ks.bind(null, "/"), + parse(e) { + ie(e, "path"); + const t = { root: "", dir: "", base: "", ext: "", name: "" }; + if (e.length === 0) + return t; + const n = e.charCodeAt(0) === he; + let r; + n ? (t.root = "/", r = 1) : r = 0; + let i = -1, a = 0, o = -1, l = !0, h = e.length - 1, c = 0; + for (; h >= r; --h) { + const d = e.charCodeAt(h); + if (d === he) { + if (!l) { + a = h + 1; break; } continue; } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } + o === -1 && (l = !1, o = h + 1), d === nt ? i === -1 ? i = h : c !== 1 && (c = 1) : i !== -1 && (c = -1); } - if (end !== -1) { - const start2 = startPart === 0 && isAbsolute ? 1 : startPart; - if (startDot === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - ret.base = ret.name = path.slice(start2, end); - } else { - ret.name = path.slice(start2, startDot); - ret.base = path.slice(start2, end); - ret.ext = path.slice(startDot, end); - } + if (o !== -1) { + const d = a === 0 && n ? 1 : a; + i === -1 || c === 0 || c === 1 && i === o - 1 && i === a + 1 ? t.base = t.name = e.slice(d, o) : (t.name = e.slice(d, i), t.base = e.slice(d, o), t.ext = e.slice(i, o)); } - if (startPart > 0) { - ret.dir = path.slice(0, startPart - 1); - } else if (isAbsolute) { - ret.dir = "/"; - } - return ret; + return a > 0 ? t.dir = e.slice(0, a - 1) : n && (t.dir = "/"), t; }, sep: "/", delimiter: ":", win32: null, posix: null }; -posix.win32 = win32.win32 = win32; -posix.posix = win32.posix = posix; -platform === "win32" ? win32.normalize : posix.normalize; -platform === "win32" ? win32.resolve : posix.resolve; -platform === "win32" ? win32.relative : posix.relative; -platform === "win32" ? win32.dirname : posix.dirname; -platform === "win32" ? win32.basename : posix.basename; -platform === "win32" ? win32.extname : posix.extname; -platform === "win32" ? win32.sep : posix.sep; -const _schemePattern = /^\w[\w\d+.-]*$/; -const _singleSlashStart = /^\//; -const _doubleSlashStart = /^\/\//; -function _validateUri(ret, _strict) { - if (!ret.scheme && _strict) { - throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`); - } - if (ret.scheme && !_schemePattern.test(ret.scheme)) { +xe.win32 = ve.win32 = ve; +xe.posix = ve.posix = xe; +ht === "win32" ? ve.normalize : xe.normalize; +ht === "win32" ? ve.resolve : xe.resolve; +ht === "win32" ? ve.relative : xe.relative; +ht === "win32" ? ve.dirname : xe.dirname; +ht === "win32" ? ve.basename : xe.basename; +ht === "win32" ? ve.extname : xe.extname; +ht === "win32" ? ve.sep : xe.sep; +const Dl = /^\w[\w\d+.-]*$/, El = /^\//, Rl = /^\/\//; +function _i(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 && !Dl.test(e.scheme)) throw new Error("[UriError]: Scheme contains illegal characters."); - } - if (ret.path) { - if (ret.authority) { - if (!_singleSlashStart.test(ret.path)) { + if (e.path) { + if (e.authority) { + if (!El.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 (_doubleSlashStart.test(ret.path)) { - throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); - } - } + } else if (Rl.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 ("//")'); } } -function _schemeFix(scheme, _strict) { - if (!scheme && !_strict) { - return "file"; - } - return scheme; +function Al(e, t) { + return !e && !t ? "file" : e; } -function _referenceResolution(scheme, path) { - switch (scheme) { +function zl(e, t) { + switch (e) { case "https": case "http": case "file": - if (!path) { - path = _slash; - } else if (path[0] !== _slash) { - path = _slash + path; - } + t ? t[0] !== Ie && (t = Ie + t) : t = Ie; break; } - return path; + return t; } -const _empty = ""; -const _slash = "/"; -const _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; -class URI$1 { - constructor(schemeOrData, authority, path, query, fragment, _strict = false) { - if (typeof schemeOrData === "object") { - this.scheme = schemeOrData.scheme || _empty; - this.authority = schemeOrData.authority || _empty; - this.path = schemeOrData.path || _empty; - this.query = schemeOrData.query || _empty; - this.fragment = schemeOrData.fragment || _empty; - } else { - this.scheme = _schemeFix(schemeOrData, _strict); - this.authority = authority || _empty; - this.path = _referenceResolution(this.scheme, path || _empty); - this.query = query || _empty; - this.fragment = fragment || _empty; - _validateUri(this, _strict); - } +const ee = "", Ie = "/", Ml = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; +class ct { + constructor(t, n, r, i, a, o = !1) { + typeof t == "object" ? (this.scheme = t.scheme || ee, this.authority = t.authority || ee, this.path = t.path || ee, this.query = t.query || ee, this.fragment = t.fragment || ee) : (this.scheme = Al(t, o), this.authority = n || ee, this.path = zl(this.scheme, r || ee), this.query = i || ee, this.fragment = a || ee, _i(this, o)); } - static isUri(thing) { - if (thing instanceof URI$1) { - return true; - } - if (!thing) { - return false; - } - return typeof thing.authority === "string" && typeof thing.fragment === "string" && typeof thing.path === "string" && typeof thing.query === "string" && typeof thing.scheme === "string" && typeof thing.fsPath === "string" && typeof thing.with === "function" && typeof thing.toString === "function"; + static isUri(t) { + return t instanceof ct ? !0 : t ? typeof t.authority == "string" && typeof t.fragment == "string" && typeof t.path == "string" && typeof t.query == "string" && typeof t.scheme == "string" && typeof t.fsPath == "string" && typeof t.with == "function" && typeof t.toString == "function" : !1; } get fsPath() { - return uriToFsPath(this, false); + return gr(this, !1); } - with(change) { - if (!change) { + with(t) { + if (!t) return this; - } - let { scheme, authority, path, query, fragment } = change; - if (scheme === void 0) { - scheme = this.scheme; - } else if (scheme === null) { - scheme = _empty; - } - if (authority === void 0) { - authority = this.authority; - } else if (authority === null) { - authority = _empty; - } - if (path === void 0) { - path = this.path; - } else if (path === null) { - path = _empty; - } - if (query === void 0) { - query = this.query; - } else if (query === null) { - query = _empty; - } - if (fragment === void 0) { - fragment = this.fragment; - } else if (fragment === null) { - fragment = _empty; - } - if (scheme === this.scheme && authority === this.authority && path === this.path && query === this.query && fragment === this.fragment) { - return this; - } - return new Uri(scheme, authority, path, query, fragment); + let { scheme: n, authority: r, path: i, query: a, fragment: o } = t; + return n === void 0 ? n = this.scheme : n === null && (n = ee), r === void 0 ? r = this.authority : r === null && (r = ee), i === void 0 ? i = this.path : i === null && (i = ee), a === void 0 ? a = this.query : a === null && (a = ee), o === void 0 ? o = this.fragment : o === null && (o = ee), n === this.scheme && r === this.authority && i === this.path && a === this.query && o === this.fragment ? this : new pt(n, r, i, a, o); } - static parse(value, _strict = false) { - const match = _regexp.exec(value); - if (!match) { - return new Uri(_empty, _empty, _empty, _empty, _empty); - } - return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); + static parse(t, n = !1) { + const r = Ml.exec(t); + return r ? new pt(r[2] || ee, an(r[4] || ee), an(r[5] || ee), an(r[7] || ee), an(r[9] || ee), n) : new pt(ee, ee, ee, ee, ee); } - static file(path) { - let authority = _empty; - if (isWindows) { - path = path.replace(/\\/g, _slash); + static file(t) { + let n = ee; + if (Bt && (t = t.replace(/\\/g, Ie)), t[0] === Ie && t[1] === Ie) { + const r = t.indexOf(Ie, 2); + r === -1 ? (n = t.substring(2), t = Ie) : (n = t.substring(2, r), t = t.substring(r) || Ie); } - if (path[0] === _slash && path[1] === _slash) { - const idx = path.indexOf(_slash, 2); - if (idx === -1) { - authority = path.substring(2); - path = _slash; - } else { - authority = path.substring(2, idx); - path = path.substring(idx) || _slash; - } - } - return new Uri("file", authority, path, _empty, _empty); + return new pt("file", n, t, ee, ee); } - static from(components) { - const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment); - _validateUri(result, true); - return result; + static from(t) { + const n = new pt(t.scheme, t.authority, t.path, t.query, t.fragment); + return _i(n, !0), n; } - static joinPath(uri, ...pathFragment) { - if (!uri.path) { - throw new Error(`[UriError]: cannot call joinPath on URI without path`); - } - let newPath; - if (isWindows && uri.scheme === "file") { - newPath = URI$1.file(win32.join(uriToFsPath(uri, true), ...pathFragment)).path; - } else { - newPath = posix.join(uri.path, ...pathFragment); - } - return uri.with({ path: newPath }); + static joinPath(t, ...n) { + if (!t.path) + throw new Error("[UriError]: cannot call joinPath on URI without path"); + let r; + return Bt && t.scheme === "file" ? r = ct.file(ve.join(gr(t, !0), ...n)).path : r = xe.join(t.path, ...n), t.with({ path: r }); } - toString(skipEncoding = false) { - return _asFormatted(this, skipEncoding); + toString(t = !1) { + return br(this, t); } toJSON() { return this; } - static revive(data) { - if (!data) { - return data; - } else if (data instanceof URI$1) { - return data; - } else { - const result = new Uri(data); - result._formatted = data.external; - result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null; - return result; - } + static revive(t) { + if (t) { + if (t instanceof ct) + return t; + { + const n = new pt(t); + return n._formatted = t.external, n._fsPath = t._sep === Zs ? t.fsPath : null, n; + } + } else + return t; } } -const _pathSepMarker = isWindows ? 1 : void 0; -class Uri extends URI$1 { +const Zs = Bt ? 1 : void 0; +class pt extends ct { constructor() { - super(...arguments); - this._formatted = null; - this._fsPath = null; + super(...arguments), this._formatted = null, this._fsPath = null; } get fsPath() { - if (!this._fsPath) { - this._fsPath = uriToFsPath(this, false); - } - return this._fsPath; + return this._fsPath || (this._fsPath = gr(this, !1)), this._fsPath; } - toString(skipEncoding = false) { - if (!skipEncoding) { - if (!this._formatted) { - this._formatted = _asFormatted(this, false); - } - return this._formatted; - } else { - return _asFormatted(this, true); - } + toString(t = !1) { + return t ? br(this, !0) : (this._formatted || (this._formatted = br(this, !1)), this._formatted); } toJSON() { - const res = { + const t = { $mid: 1 }; - if (this._fsPath) { - res.fsPath = this._fsPath; - res._sep = _pathSepMarker; - } - if (this._formatted) { - res.external = this._formatted; - } - if (this.path) { - res.path = this.path; - } - if (this.scheme) { - res.scheme = this.scheme; - } - if (this.authority) { - res.authority = this.authority; - } - if (this.query) { - res.query = this.query; - } - if (this.fragment) { - res.fragment = this.fragment; - } - return res; + return this._fsPath && (t.fsPath = this._fsPath, t._sep = Zs), this._formatted && (t.external = this._formatted), this.path && (t.path = this.path), this.scheme && (t.scheme = this.scheme), this.authority && (t.authority = this.authority), this.query && (t.query = this.query), this.fragment && (t.fragment = this.fragment), t; } } -const encodeTable = { +const Qs = { [58]: "%3A", [47]: "%2F", [63]: "%3F", @@ -3395,682 +2063,341 @@ const encodeTable = { [61]: "%3D", [32]: "%20" }; -function encodeURIComponentFast(uriComponent, allowSlash) { - let res = void 0; - let nativeEncodePos = -1; - for (let pos = 0; pos < uriComponent.length; pos++) { - const code = uriComponent.charCodeAt(pos); - if (code >= 97 && code <= 122 || code >= 65 && code <= 90 || code >= 48 && code <= 57 || code === 45 || code === 46 || code === 95 || code === 126 || allowSlash && code === 47) { - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); - nativeEncodePos = -1; - } - if (res !== void 0) { - res += uriComponent.charAt(pos); - } - } else { - if (res === void 0) { - res = uriComponent.substr(0, pos); - } - const escaped = encodeTable[code]; - if (escaped !== void 0) { - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); - nativeEncodePos = -1; - } - res += escaped; - } else if (nativeEncodePos === -1) { - nativeEncodePos = pos; - } +function Di(e, t) { + let n, r = -1; + for (let i = 0; i < e.length; i++) { + const a = e.charCodeAt(i); + if (a >= 97 && a <= 122 || a >= 65 && a <= 90 || a >= 48 && a <= 57 || a === 45 || a === 46 || a === 95 || a === 126 || t && a === 47) + r !== -1 && (n += encodeURIComponent(e.substring(r, i)), r = -1), n !== void 0 && (n += e.charAt(i)); + else { + n === void 0 && (n = e.substr(0, i)); + const o = Qs[a]; + o !== void 0 ? (r !== -1 && (n += encodeURIComponent(e.substring(r, i)), r = -1), n += o) : r === -1 && (r = i); } } - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos)); - } - return res !== void 0 ? res : uriComponent; + return r !== -1 && (n += encodeURIComponent(e.substring(r))), n !== void 0 ? n : e; } -function encodeURIComponentMinimal(path) { - let res = void 0; - for (let pos = 0; pos < path.length; pos++) { - const code = path.charCodeAt(pos); - if (code === 35 || code === 63) { - if (res === void 0) { - res = path.substr(0, pos); - } - res += encodeTable[code]; - } else { - if (res !== void 0) { - res += path[pos]; - } - } +function Nl(e) { + let t; + for (let n = 0; n < e.length; n++) { + const r = e.charCodeAt(n); + r === 35 || r === 63 ? (t === void 0 && (t = e.substr(0, n)), t += Qs[r]) : t !== void 0 && (t += e[n]); } - return res !== void 0 ? res : path; + return t !== void 0 ? t : e; } -function uriToFsPath(uri, keepDriveLetterCasing) { - let value; - if (uri.authority && uri.path.length > 1 && uri.scheme === "file") { - value = `//${uri.authority}${uri.path}`; - } else if (uri.path.charCodeAt(0) === 47 && (uri.path.charCodeAt(1) >= 65 && uri.path.charCodeAt(1) <= 90 || uri.path.charCodeAt(1) >= 97 && uri.path.charCodeAt(1) <= 122) && uri.path.charCodeAt(2) === 58) { - if (!keepDriveLetterCasing) { - value = uri.path[1].toLowerCase() + uri.path.substr(2); - } else { - value = uri.path.substr(1); - } - } else { - value = uri.path; - } - if (isWindows) { - value = value.replace(/\//g, "\\"); - } - return value; +function gr(e, t) { + let n; + return e.authority && e.path.length > 1 && e.scheme === "file" ? n = `//${e.authority}${e.path}` : e.path.charCodeAt(0) === 47 && (e.path.charCodeAt(1) >= 65 && e.path.charCodeAt(1) <= 90 || e.path.charCodeAt(1) >= 97 && e.path.charCodeAt(1) <= 122) && e.path.charCodeAt(2) === 58 ? t ? n = e.path.substr(1) : n = e.path[1].toLowerCase() + e.path.substr(2) : n = e.path, Bt && (n = n.replace(/\//g, "\\")), n; } -function _asFormatted(uri, skipEncoding) { - const encoder = !skipEncoding ? encodeURIComponentFast : encodeURIComponentMinimal; - let res = ""; - let { scheme, authority, path, query, fragment } = uri; - if (scheme) { - res += scheme; - res += ":"; - } - if (authority || scheme === "file") { - res += _slash; - res += _slash; - } - if (authority) { - let idx = authority.indexOf("@"); - if (idx !== -1) { - const userinfo = authority.substr(0, idx); - authority = authority.substr(idx + 1); - idx = userinfo.indexOf(":"); - if (idx === -1) { - res += encoder(userinfo, false); - } else { - res += encoder(userinfo.substr(0, idx), false); - res += ":"; - res += encoder(userinfo.substr(idx + 1), false); - } - res += "@"; +function br(e, t) { + const n = t ? Nl : Di; + let r = "", { scheme: i, authority: a, path: o, query: l, fragment: h } = e; + if (i && (r += i, r += ":"), (a || i === "file") && (r += Ie, r += Ie), a) { + let c = a.indexOf("@"); + if (c !== -1) { + const d = a.substr(0, c); + a = a.substr(c + 1), c = d.indexOf(":"), c === -1 ? r += n(d, !1) : (r += n(d.substr(0, c), !1), r += ":", r += n(d.substr(c + 1), !1)), r += "@"; } - authority = authority.toLowerCase(); - idx = authority.indexOf(":"); - if (idx === -1) { - res += encoder(authority, false); - } else { - res += encoder(authority.substr(0, idx), false); - res += authority.substr(idx); + a = a.toLowerCase(), c = a.indexOf(":"), c === -1 ? r += n(a, !1) : (r += n(a.substr(0, c), !1), r += a.substr(c)); + } + if (o) { + if (o.length >= 3 && o.charCodeAt(0) === 47 && o.charCodeAt(2) === 58) { + const c = o.charCodeAt(1); + c >= 65 && c <= 90 && (o = `/${String.fromCharCode(c + 32)}:${o.substr(3)}`); + } else if (o.length >= 2 && o.charCodeAt(1) === 58) { + const c = o.charCodeAt(0); + c >= 65 && c <= 90 && (o = `${String.fromCharCode(c + 32)}:${o.substr(2)}`); } + r += n(o, !0); } - if (path) { - if (path.length >= 3 && path.charCodeAt(0) === 47 && path.charCodeAt(2) === 58) { - const code = path.charCodeAt(1); - if (code >= 65 && code <= 90) { - path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; - } - } else if (path.length >= 2 && path.charCodeAt(1) === 58) { - const code = path.charCodeAt(0); - if (code >= 65 && code <= 90) { - path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; - } - } - res += encoder(path, true); - } - if (query) { - res += "?"; - res += encoder(query, false); - } - if (fragment) { - res += "#"; - res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment; - } - return res; + return l && (r += "?", r += n(l, !1)), h && (r += "#", r += t ? h : Di(h, !1)), r; } -function decodeURIComponentGraceful(str) { +function eo(e) { try { - return decodeURIComponent(str); - } catch (_a2) { - if (str.length > 3) { - return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); - } else { - return str; - } + return decodeURIComponent(e); + } catch { + return e.length > 3 ? e.substr(0, 3) + eo(e.substr(3)) : e; } } -const _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; -function percentDecode(str) { - if (!str.match(_rEncodedAsHex)) { - return str; - } - return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match)); +const Ei = /(%[0-9A-Za-z][0-9A-Za-z])+/g; +function an(e) { + return e.match(Ei) ? e.replace(Ei, (t) => eo(t)) : e; } -class Position$1 { - constructor(lineNumber, column) { - this.lineNumber = lineNumber; - this.column = column; +class we { + constructor(t, n) { + this.lineNumber = t, this.column = n; } - with(newLineNumber = this.lineNumber, newColumn = this.column) { - if (newLineNumber === this.lineNumber && newColumn === this.column) { - return this; - } else { - return new Position$1(newLineNumber, newColumn); + with(t = this.lineNumber, n = this.column) { + return t === this.lineNumber && n === this.column ? this : new we(t, n); + } + delta(t = 0, n = 0) { + return this.with(this.lineNumber + t, this.column + n); + } + equals(t) { + return we.equals(this, t); + } + static equals(t, n) { + return !t && !n ? !0 : !!t && !!n && t.lineNumber === n.lineNumber && t.column === n.column; + } + isBefore(t) { + return we.isBefore(this, t); + } + static isBefore(t, n) { + return t.lineNumber < n.lineNumber ? !0 : n.lineNumber < t.lineNumber ? !1 : t.column < n.column; + } + isBeforeOrEqual(t) { + return we.isBeforeOrEqual(this, t); + } + static isBeforeOrEqual(t, n) { + return t.lineNumber < n.lineNumber ? !0 : n.lineNumber < t.lineNumber ? !1 : t.column <= n.column; + } + static compare(t, n) { + const r = t.lineNumber | 0, i = n.lineNumber | 0; + if (r === i) { + const a = t.column | 0, o = n.column | 0; + return a - o; } - } - delta(deltaLineNumber = 0, deltaColumn = 0) { - return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn); - } - equals(other) { - return Position$1.equals(this, other); - } - static equals(a2, b) { - if (!a2 && !b) { - return true; - } - return !!a2 && !!b && a2.lineNumber === b.lineNumber && a2.column === b.column; - } - isBefore(other) { - return Position$1.isBefore(this, other); - } - static isBefore(a2, b) { - if (a2.lineNumber < b.lineNumber) { - return true; - } - if (b.lineNumber < a2.lineNumber) { - return false; - } - return a2.column < b.column; - } - isBeforeOrEqual(other) { - return Position$1.isBeforeOrEqual(this, other); - } - static isBeforeOrEqual(a2, b) { - if (a2.lineNumber < b.lineNumber) { - return true; - } - if (b.lineNumber < a2.lineNumber) { - return false; - } - return a2.column <= b.column; - } - static compare(a2, b) { - const aLineNumber = a2.lineNumber | 0; - const bLineNumber = b.lineNumber | 0; - if (aLineNumber === bLineNumber) { - const aColumn = a2.column | 0; - const bColumn = b.column | 0; - return aColumn - bColumn; - } - return aLineNumber - bLineNumber; + return r - i; } clone() { - return new Position$1(this.lineNumber, this.column); + return new we(this.lineNumber, this.column); } toString() { return "(" + this.lineNumber + "," + this.column + ")"; } - static lift(pos) { - return new Position$1(pos.lineNumber, pos.column); + static lift(t) { + return new we(t.lineNumber, t.column); } - static isIPosition(obj) { - return obj && typeof obj.lineNumber === "number" && typeof obj.column === "number"; + static isIPosition(t) { + return t && typeof t.lineNumber == "number" && typeof t.column == "number"; } } -class Range$1 { - constructor(startLineNumber, startColumn, endLineNumber, endColumn) { - if (startLineNumber > endLineNumber || startLineNumber === endLineNumber && startColumn > endColumn) { - this.startLineNumber = endLineNumber; - this.startColumn = endColumn; - this.endLineNumber = startLineNumber; - this.endColumn = startColumn; - } else { - this.startLineNumber = startLineNumber; - this.startColumn = startColumn; - this.endLineNumber = endLineNumber; - this.endColumn = endColumn; - } +class te { + constructor(t, n, r, i) { + t > r || t === r && n > i ? (this.startLineNumber = r, this.startColumn = i, this.endLineNumber = t, this.endColumn = n) : (this.startLineNumber = t, this.startColumn = n, this.endLineNumber = r, this.endColumn = i); } isEmpty() { - return Range$1.isEmpty(this); + return te.isEmpty(this); } - static isEmpty(range) { - return range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn; + static isEmpty(t) { + return t.startLineNumber === t.endLineNumber && t.startColumn === t.endColumn; } - containsPosition(position) { - return Range$1.containsPosition(this, position); + containsPosition(t) { + return te.containsPosition(this, t); } - static containsPosition(range, position) { - if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { - return false; - } - if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) { - return false; - } - if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) { - return false; - } - return true; + static containsPosition(t, n) { + return !(n.lineNumber < t.startLineNumber || n.lineNumber > t.endLineNumber || n.lineNumber === t.startLineNumber && n.column < t.startColumn || n.lineNumber === t.endLineNumber && n.column > t.endColumn); } - static strictContainsPosition(range, position) { - if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { - return false; - } - if (position.lineNumber === range.startLineNumber && position.column <= range.startColumn) { - return false; - } - if (position.lineNumber === range.endLineNumber && position.column >= range.endColumn) { - return false; - } - return true; + static strictContainsPosition(t, n) { + return !(n.lineNumber < t.startLineNumber || n.lineNumber > t.endLineNumber || n.lineNumber === t.startLineNumber && n.column <= t.startColumn || n.lineNumber === t.endLineNumber && n.column >= t.endColumn); } - containsRange(range) { - return Range$1.containsRange(this, range); + containsRange(t) { + return te.containsRange(this, t); } - static containsRange(range, otherRange) { - if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { - return false; - } - if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { - return false; - } - if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) { - return false; - } - if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) { - return false; - } - return true; + static containsRange(t, n) { + return !(n.startLineNumber < t.startLineNumber || n.endLineNumber < t.startLineNumber || n.startLineNumber > t.endLineNumber || n.endLineNumber > t.endLineNumber || n.startLineNumber === t.startLineNumber && n.startColumn < t.startColumn || n.endLineNumber === t.endLineNumber && n.endColumn > t.endColumn); } - strictContainsRange(range) { - return Range$1.strictContainsRange(this, range); + strictContainsRange(t) { + return te.strictContainsRange(this, t); } - static strictContainsRange(range, otherRange) { - if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { - return false; - } - if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { - return false; - } - if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) { - return false; - } - if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) { - return false; - } - return true; + static strictContainsRange(t, n) { + return !(n.startLineNumber < t.startLineNumber || n.endLineNumber < t.startLineNumber || n.startLineNumber > t.endLineNumber || n.endLineNumber > t.endLineNumber || n.startLineNumber === t.startLineNumber && n.startColumn <= t.startColumn || n.endLineNumber === t.endLineNumber && n.endColumn >= t.endColumn); } - plusRange(range) { - return Range$1.plusRange(this, range); + plusRange(t) { + return te.plusRange(this, t); } - static plusRange(a2, b) { - let startLineNumber; - let startColumn; - let endLineNumber; - let endColumn; - if (b.startLineNumber < a2.startLineNumber) { - startLineNumber = b.startLineNumber; - startColumn = b.startColumn; - } else if (b.startLineNumber === a2.startLineNumber) { - startLineNumber = b.startLineNumber; - startColumn = Math.min(b.startColumn, a2.startColumn); - } else { - startLineNumber = a2.startLineNumber; - startColumn = a2.startColumn; - } - if (b.endLineNumber > a2.endLineNumber) { - endLineNumber = b.endLineNumber; - endColumn = b.endColumn; - } else if (b.endLineNumber === a2.endLineNumber) { - endLineNumber = b.endLineNumber; - endColumn = Math.max(b.endColumn, a2.endColumn); - } else { - endLineNumber = a2.endLineNumber; - endColumn = a2.endColumn; - } - return new Range$1(startLineNumber, startColumn, endLineNumber, endColumn); + static plusRange(t, n) { + let r, i, a, o; + return n.startLineNumber < t.startLineNumber ? (r = n.startLineNumber, i = n.startColumn) : n.startLineNumber === t.startLineNumber ? (r = n.startLineNumber, i = Math.min(n.startColumn, t.startColumn)) : (r = t.startLineNumber, i = t.startColumn), n.endLineNumber > t.endLineNumber ? (a = n.endLineNumber, o = n.endColumn) : n.endLineNumber === t.endLineNumber ? (a = n.endLineNumber, o = Math.max(n.endColumn, t.endColumn)) : (a = t.endLineNumber, o = t.endColumn), new te(r, i, a, o); } - intersectRanges(range) { - return Range$1.intersectRanges(this, range); + intersectRanges(t) { + return te.intersectRanges(this, t); } - static intersectRanges(a2, b) { - let resultStartLineNumber = a2.startLineNumber; - let resultStartColumn = a2.startColumn; - let resultEndLineNumber = a2.endLineNumber; - let resultEndColumn = a2.endColumn; - let otherStartLineNumber = b.startLineNumber; - let otherStartColumn = b.startColumn; - let otherEndLineNumber = b.endLineNumber; - let otherEndColumn = b.endColumn; - if (resultStartLineNumber < otherStartLineNumber) { - resultStartLineNumber = otherStartLineNumber; - resultStartColumn = otherStartColumn; - } else if (resultStartLineNumber === otherStartLineNumber) { - resultStartColumn = Math.max(resultStartColumn, otherStartColumn); - } - if (resultEndLineNumber > otherEndLineNumber) { - resultEndLineNumber = otherEndLineNumber; - resultEndColumn = otherEndColumn; - } else if (resultEndLineNumber === otherEndLineNumber) { - resultEndColumn = Math.min(resultEndColumn, otherEndColumn); - } - if (resultStartLineNumber > resultEndLineNumber) { - return null; - } - if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) { - return null; - } - return new Range$1(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn); + static intersectRanges(t, n) { + let r = t.startLineNumber, i = t.startColumn, a = t.endLineNumber, o = t.endColumn, l = n.startLineNumber, h = n.startColumn, c = n.endLineNumber, d = n.endColumn; + return r < l ? (r = l, i = h) : r === l && (i = Math.max(i, h)), a > c ? (a = c, o = d) : a === c && (o = Math.min(o, d)), r > a || r === a && i > o ? null : new te(r, i, a, o); } - equalsRange(other) { - return Range$1.equalsRange(this, other); + equalsRange(t) { + return te.equalsRange(this, t); } - static equalsRange(a2, b) { - return !!a2 && !!b && a2.startLineNumber === b.startLineNumber && a2.startColumn === b.startColumn && a2.endLineNumber === b.endLineNumber && a2.endColumn === b.endColumn; + static equalsRange(t, n) { + return !!t && !!n && t.startLineNumber === n.startLineNumber && t.startColumn === n.startColumn && t.endLineNumber === n.endLineNumber && t.endColumn === n.endColumn; } getEndPosition() { - return Range$1.getEndPosition(this); + return te.getEndPosition(this); } - static getEndPosition(range) { - return new Position$1(range.endLineNumber, range.endColumn); + static getEndPosition(t) { + return new we(t.endLineNumber, t.endColumn); } getStartPosition() { - return Range$1.getStartPosition(this); + return te.getStartPosition(this); } - static getStartPosition(range) { - return new Position$1(range.startLineNumber, range.startColumn); + static getStartPosition(t) { + return new we(t.startLineNumber, t.startColumn); } toString() { return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]"; } - setEndPosition(endLineNumber, endColumn) { - return new Range$1(this.startLineNumber, this.startColumn, endLineNumber, endColumn); + setEndPosition(t, n) { + return new te(this.startLineNumber, this.startColumn, t, n); } - setStartPosition(startLineNumber, startColumn) { - return new Range$1(startLineNumber, startColumn, this.endLineNumber, this.endColumn); + setStartPosition(t, n) { + return new te(t, n, this.endLineNumber, this.endColumn); } collapseToStart() { - return Range$1.collapseToStart(this); + return te.collapseToStart(this); } - static collapseToStart(range) { - return new Range$1(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn); + static collapseToStart(t) { + return new te(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn); } - static fromPositions(start, end = start) { - return new Range$1(start.lineNumber, start.column, end.lineNumber, end.column); + static fromPositions(t, n = t) { + return new te(t.lineNumber, t.column, n.lineNumber, n.column); } - static lift(range) { - if (!range) { - return null; - } - return new Range$1(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); + static lift(t) { + return t ? new te(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : null; } - static isIRange(obj) { - return obj && typeof obj.startLineNumber === "number" && typeof obj.startColumn === "number" && typeof obj.endLineNumber === "number" && typeof obj.endColumn === "number"; + static isIRange(t) { + return t && typeof t.startLineNumber == "number" && typeof t.startColumn == "number" && typeof t.endLineNumber == "number" && typeof t.endColumn == "number"; } - static areIntersectingOrTouching(a2, b) { - if (a2.endLineNumber < b.startLineNumber || a2.endLineNumber === b.startLineNumber && a2.endColumn < b.startColumn) { - return false; - } - if (b.endLineNumber < a2.startLineNumber || b.endLineNumber === a2.startLineNumber && b.endColumn < a2.startColumn) { - return false; - } - return true; + static areIntersectingOrTouching(t, n) { + return !(t.endLineNumber < n.startLineNumber || t.endLineNumber === n.startLineNumber && t.endColumn < n.startColumn || n.endLineNumber < t.startLineNumber || n.endLineNumber === t.startLineNumber && n.endColumn < t.startColumn); } - static areIntersecting(a2, b) { - if (a2.endLineNumber < b.startLineNumber || a2.endLineNumber === b.startLineNumber && a2.endColumn <= b.startColumn) { - return false; - } - if (b.endLineNumber < a2.startLineNumber || b.endLineNumber === a2.startLineNumber && b.endColumn <= a2.startColumn) { - return false; - } - return true; + static areIntersecting(t, n) { + return !(t.endLineNumber < n.startLineNumber || t.endLineNumber === n.startLineNumber && t.endColumn <= n.startColumn || n.endLineNumber < t.startLineNumber || n.endLineNumber === t.startLineNumber && n.endColumn <= t.startColumn); } - static compareRangesUsingStarts(a2, b) { - if (a2 && b) { - const aStartLineNumber = a2.startLineNumber | 0; - const bStartLineNumber = b.startLineNumber | 0; - if (aStartLineNumber === bStartLineNumber) { - const aStartColumn = a2.startColumn | 0; - const bStartColumn = b.startColumn | 0; - if (aStartColumn === bStartColumn) { - const aEndLineNumber = a2.endLineNumber | 0; - const bEndLineNumber = b.endLineNumber | 0; - if (aEndLineNumber === bEndLineNumber) { - const aEndColumn = a2.endColumn | 0; - const bEndColumn = b.endColumn | 0; - return aEndColumn - bEndColumn; + static compareRangesUsingStarts(t, n) { + if (t && n) { + const a = t.startLineNumber | 0, o = n.startLineNumber | 0; + if (a === o) { + const l = t.startColumn | 0, h = n.startColumn | 0; + if (l === h) { + const c = t.endLineNumber | 0, d = n.endLineNumber | 0; + if (c === d) { + const p = t.endColumn | 0, f = n.endColumn | 0; + return p - f; } - return aEndLineNumber - bEndLineNumber; + return c - d; } - return aStartColumn - bStartColumn; + return l - h; } - return aStartLineNumber - bStartLineNumber; + return a - o; } - const aExists = a2 ? 1 : 0; - const bExists = b ? 1 : 0; - return aExists - bExists; + return (t ? 1 : 0) - (n ? 1 : 0); } - static compareRangesUsingEnds(a2, b) { - if (a2.endLineNumber === b.endLineNumber) { - if (a2.endColumn === b.endColumn) { - if (a2.startLineNumber === b.startLineNumber) { - return a2.startColumn - b.startColumn; - } - return a2.startLineNumber - b.startLineNumber; - } - return a2.endColumn - b.endColumn; - } - return a2.endLineNumber - b.endLineNumber; + static compareRangesUsingEnds(t, n) { + return t.endLineNumber === n.endLineNumber ? t.endColumn === n.endColumn ? t.startLineNumber === n.startLineNumber ? t.startColumn - n.startColumn : t.startLineNumber - n.startLineNumber : t.endColumn - n.endColumn : t.endLineNumber - n.endLineNumber; } - static spansMultipleLines(range) { - return range.endLineNumber > range.startLineNumber; + static spansMultipleLines(t) { + return t.endLineNumber > t.startLineNumber; } toJSON() { return this; } } -const MINIMUM_MATCHING_CHARACTER_LENGTH = 3; -function computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) { - const diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate); - return diffAlgo.ComputeDiff(pretty); +const Pl = 3; +function to(e, t, n, r) { + return new Qe(e, t, n).ComputeDiff(r); } -class LineSequence { - constructor(lines) { - const startColumns = []; - const endColumns = []; - for (let i = 0, length = lines.length; i < length; i++) { - startColumns[i] = getFirstNonBlankColumn(lines[i], 1); - endColumns[i] = getLastNonBlankColumn(lines[i], 1); - } - this.lines = lines; - this._startColumns = startColumns; - this._endColumns = endColumns; +class Ri { + constructor(t) { + const n = [], r = []; + for (let i = 0, a = t.length; i < a; i++) + n[i] = vr(t[i], 1), r[i] = yr(t[i], 1); + this.lines = t, this._startColumns = n, this._endColumns = r; } getElements() { - const elements = []; - for (let i = 0, len = this.lines.length; i < len; i++) { - elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1); + const t = []; + for (let n = 0, r = this.lines.length; n < r; n++) + t[n] = this.lines[n].substring(this._startColumns[n] - 1, this._endColumns[n] - 1); + return t; + } + getStrictElement(t) { + return this.lines[t]; + } + getStartLineNumber(t) { + return t + 1; + } + getEndLineNumber(t) { + return t + 1; + } + createCharSequence(t, n, r) { + const i = [], a = [], o = []; + let l = 0; + for (let h = n; h <= r; h++) { + const c = this.lines[h], d = t ? this._startColumns[h] : 1, p = t ? this._endColumns[h] : c.length + 1; + for (let f = d; f < p; f++) + i[l] = c.charCodeAt(f - 1), a[l] = h + 1, o[l] = f, l++; } - return elements; - } - getStrictElement(index) { - return this.lines[index]; - } - getStartLineNumber(i) { - return i + 1; - } - getEndLineNumber(i) { - return i + 1; - } - createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) { - const charCodes = []; - const lineNumbers = []; - const columns = []; - let len = 0; - for (let index = startIndex; index <= endIndex; index++) { - const lineContent = this.lines[index]; - const startColumn = shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1; - const endColumn = shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1; - for (let col = startColumn; col < endColumn; col++) { - charCodes[len] = lineContent.charCodeAt(col - 1); - lineNumbers[len] = index + 1; - columns[len] = col; - len++; - } - } - return new CharSequence(charCodes, lineNumbers, columns); + return new Il(i, a, o); } } -class CharSequence { - constructor(charCodes, lineNumbers, columns) { - this._charCodes = charCodes; - this._lineNumbers = lineNumbers; - this._columns = columns; +class Il { + constructor(t, n, r) { + this._charCodes = t, this._lineNumbers = n, this._columns = r; } getElements() { return this._charCodes; } - getStartLineNumber(i) { - return this._lineNumbers[i]; + getStartLineNumber(t) { + return this._lineNumbers[t]; } - getStartColumn(i) { - return this._columns[i]; + getStartColumn(t) { + return this._columns[t]; } - getEndLineNumber(i) { - return this._lineNumbers[i]; + getEndLineNumber(t) { + return this._lineNumbers[t]; } - getEndColumn(i) { - return this._columns[i] + 1; + getEndColumn(t) { + return this._columns[t] + 1; } } -class CharChange { - constructor(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) { - this.originalStartLineNumber = originalStartLineNumber; - this.originalStartColumn = originalStartColumn; - this.originalEndLineNumber = originalEndLineNumber; - this.originalEndColumn = originalEndColumn; - this.modifiedStartLineNumber = modifiedStartLineNumber; - this.modifiedStartColumn = modifiedStartColumn; - this.modifiedEndLineNumber = modifiedEndLineNumber; - this.modifiedEndColumn = modifiedEndColumn; +class jt { + constructor(t, n, r, i, a, o, l, h) { + this.originalStartLineNumber = t, this.originalStartColumn = n, this.originalEndLineNumber = r, this.originalEndColumn = i, this.modifiedStartLineNumber = a, this.modifiedStartColumn = o, this.modifiedEndLineNumber = l, this.modifiedEndColumn = h; } - static createFromDiffChange(diffChange, originalCharSequence, modifiedCharSequence) { - let originalStartLineNumber; - let originalStartColumn; - let originalEndLineNumber; - let originalEndColumn; - let modifiedStartLineNumber; - let modifiedStartColumn; - let modifiedEndLineNumber; - let modifiedEndColumn; - if (diffChange.originalLength === 0) { - originalStartLineNumber = 0; - originalStartColumn = 0; - originalEndLineNumber = 0; - originalEndColumn = 0; - } else { - originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart); - originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart); - originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1); - originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1); - } - if (diffChange.modifiedLength === 0) { - modifiedStartLineNumber = 0; - modifiedStartColumn = 0; - modifiedEndLineNumber = 0; - modifiedEndColumn = 0; - } else { - modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart); - modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart); - modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1); - modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1); - } - return new CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn); + static createFromDiffChange(t, n, r) { + let i, a, o, l, h, c, d, p; + return t.originalLength === 0 ? (i = 0, a = 0, o = 0, l = 0) : (i = n.getStartLineNumber(t.originalStart), a = n.getStartColumn(t.originalStart), o = n.getEndLineNumber(t.originalStart + t.originalLength - 1), l = n.getEndColumn(t.originalStart + t.originalLength - 1)), t.modifiedLength === 0 ? (h = 0, c = 0, d = 0, p = 0) : (h = r.getStartLineNumber(t.modifiedStart), c = r.getStartColumn(t.modifiedStart), d = r.getEndLineNumber(t.modifiedStart + t.modifiedLength - 1), p = r.getEndColumn(t.modifiedStart + t.modifiedLength - 1)), new jt(i, a, o, l, h, c, d, p); } } -function postProcessCharChanges(rawChanges) { - if (rawChanges.length <= 1) { - return rawChanges; +function Ll(e) { + if (e.length <= 1) + return e; + const t = [e[0]]; + let n = t[0]; + for (let r = 1, i = e.length; r < i; r++) { + const a = e[r], o = a.originalStart - (n.originalStart + n.originalLength), l = a.modifiedStart - (n.modifiedStart + n.modifiedLength); + Math.min(o, l) < Pl ? (n.originalLength = a.originalStart + a.originalLength - n.originalStart, n.modifiedLength = a.modifiedStart + a.modifiedLength - n.modifiedStart) : (t.push(a), n = a); } - const result = [rawChanges[0]]; - let prevChange = result[0]; - for (let i = 1, len = rawChanges.length; i < len; i++) { - const currChange = rawChanges[i]; - const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength); - const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength); - const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength); - if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) { - prevChange.originalLength = currChange.originalStart + currChange.originalLength - prevChange.originalStart; - prevChange.modifiedLength = currChange.modifiedStart + currChange.modifiedLength - prevChange.modifiedStart; - } else { - result.push(currChange); - prevChange = currChange; - } - } - return result; + return t; } -class LineChange { - constructor(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) { - this.originalStartLineNumber = originalStartLineNumber; - this.originalEndLineNumber = originalEndLineNumber; - this.modifiedStartLineNumber = modifiedStartLineNumber; - this.modifiedEndLineNumber = modifiedEndLineNumber; - this.charChanges = charChanges; +class Vt { + constructor(t, n, r, i, a) { + this.originalStartLineNumber = t, this.originalEndLineNumber = n, this.modifiedStartLineNumber = r, this.modifiedEndLineNumber = i, this.charChanges = a; } - static createFromDiffResult(shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueCharDiff, shouldComputeCharChanges, shouldPostProcessCharChanges) { - let originalStartLineNumber; - let originalEndLineNumber; - let modifiedStartLineNumber; - let modifiedEndLineNumber; - let charChanges = void 0; - if (diffChange.originalLength === 0) { - originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1; - originalEndLineNumber = 0; - } else { - originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart); - originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1); + static createFromDiffResult(t, n, r, i, a, o, l) { + let h, c, d, p, f; + if (n.originalLength === 0 ? (h = r.getStartLineNumber(n.originalStart) - 1, c = 0) : (h = r.getStartLineNumber(n.originalStart), c = r.getEndLineNumber(n.originalStart + n.originalLength - 1)), n.modifiedLength === 0 ? (d = i.getStartLineNumber(n.modifiedStart) - 1, p = 0) : (d = i.getStartLineNumber(n.modifiedStart), p = i.getEndLineNumber(n.modifiedStart + n.modifiedLength - 1)), o && n.originalLength > 0 && n.originalLength < 20 && n.modifiedLength > 0 && n.modifiedLength < 20 && a()) { + const g = r.createCharSequence(t, n.originalStart, n.originalStart + n.originalLength - 1), w = i.createCharSequence(t, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1); + let b = to(g, w, a, !0).changes; + l && (b = Ll(b)), f = []; + for (let y = 0, A = b.length; y < A; y++) + f.push(jt.createFromDiffChange(b[y], g, w)); } - if (diffChange.modifiedLength === 0) { - modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1; - modifiedEndLineNumber = 0; - } else { - modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart); - modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1); - } - if (shouldComputeCharChanges && diffChange.originalLength > 0 && diffChange.originalLength < 20 && diffChange.modifiedLength > 0 && diffChange.modifiedLength < 20 && continueCharDiff()) { - const originalCharSequence = originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1); - const modifiedCharSequence = modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1); - let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueCharDiff, true).changes; - if (shouldPostProcessCharChanges) { - rawChanges = postProcessCharChanges(rawChanges); - } - charChanges = []; - for (let i = 0, length = rawChanges.length; i < length; i++) { - charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence)); - } - } - return new LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges); + return new Vt(h, c, d, p, f); } } -class DiffComputer { - constructor(originalLines, modifiedLines, opts) { - this.shouldComputeCharChanges = opts.shouldComputeCharChanges; - this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges; - this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace; - this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff; - this.originalLines = originalLines; - this.modifiedLines = modifiedLines; - this.original = new LineSequence(originalLines); - this.modified = new LineSequence(modifiedLines); - this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime); - this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5e3)); +class Tl { + constructor(t, n, r) { + this.shouldComputeCharChanges = r.shouldComputeCharChanges, this.shouldPostProcessCharChanges = r.shouldPostProcessCharChanges, this.shouldIgnoreTrimWhitespace = r.shouldIgnoreTrimWhitespace, this.shouldMakePrettyDiff = r.shouldMakePrettyDiff, this.originalLines = t, this.modifiedLines = n, this.original = new Ri(t), this.modified = new Ri(n), this.continueLineDiff = Ai(r.maxComputationTime), this.continueCharDiff = Ai(r.maxComputationTime === 0 ? 0 : Math.min(r.maxComputationTime, 5e3)); } computeDiff() { - if (this.original.lines.length === 1 && this.original.lines[0].length === 0) { - if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { - return { - quitEarly: false, - changes: [] - }; - } - return { - quitEarly: false, + if (this.original.lines.length === 1 && this.original.lines[0].length === 0) + return this.modified.lines.length === 1 && this.modified.lines[0].length === 0 ? { + quitEarly: !1, + changes: [] + } : { + quitEarly: !1, changes: [{ originalStartLineNumber: 1, originalEndLineNumber: 1, @@ -4088,10 +2415,9 @@ class DiffComputer { }] }] }; - } - if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { + if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) return { - quitEarly: false, + quitEarly: !1, changes: [{ originalStartLineNumber: 1, originalEndLineNumber: this.original.lines.length, @@ -4109,289 +2435,144 @@ class DiffComputer { }] }] }; - } - const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff); - const rawChanges = diffResult.changes; - const quitEarly = diffResult.quitEarly; + const t = to(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff), n = t.changes, r = t.quitEarly; if (this.shouldIgnoreTrimWhitespace) { - const lineChanges = []; - for (let i = 0, length = rawChanges.length; i < length; i++) { - lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); - } + const l = []; + for (let h = 0, c = n.length; h < c; h++) + l.push(Vt.createFromDiffResult(this.shouldIgnoreTrimWhitespace, n[h], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); return { - quitEarly, - changes: lineChanges + quitEarly: r, + changes: l }; } - const result = []; - let originalLineIndex = 0; - let modifiedLineIndex = 0; - for (let i = -1, len = rawChanges.length; i < len; i++) { - const nextChange = i + 1 < len ? rawChanges[i + 1] : null; - const originalStop = nextChange ? nextChange.originalStart : this.originalLines.length; - const modifiedStop = nextChange ? nextChange.modifiedStart : this.modifiedLines.length; - while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) { - const originalLine = this.originalLines[originalLineIndex]; - const modifiedLine = this.modifiedLines[modifiedLineIndex]; - if (originalLine !== modifiedLine) { + const i = []; + let a = 0, o = 0; + for (let l = -1, h = n.length; l < h; l++) { + const c = l + 1 < h ? n[l + 1] : null, d = c ? c.originalStart : this.originalLines.length, p = c ? c.modifiedStart : this.modifiedLines.length; + for (; a < d && o < p; ) { + const f = this.originalLines[a], g = this.modifiedLines[o]; + if (f !== g) { { - let originalStartColumn = getFirstNonBlankColumn(originalLine, 1); - let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1); - while (originalStartColumn > 1 && modifiedStartColumn > 1) { - const originalChar = originalLine.charCodeAt(originalStartColumn - 2); - const modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2); - if (originalChar !== modifiedChar) { + let w = vr(f, 1), b = vr(g, 1); + for (; w > 1 && b > 1; ) { + const y = f.charCodeAt(w - 2), A = g.charCodeAt(b - 2); + if (y !== A) break; - } - originalStartColumn--; - modifiedStartColumn--; - } - if (originalStartColumn > 1 || modifiedStartColumn > 1) { - this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn); + w--, b--; } + (w > 1 || b > 1) && this._pushTrimWhitespaceCharChange(i, a + 1, 1, w, o + 1, 1, b); } { - let originalEndColumn = getLastNonBlankColumn(originalLine, 1); - let modifiedEndColumn = getLastNonBlankColumn(modifiedLine, 1); - const originalMaxColumn = originalLine.length + 1; - const modifiedMaxColumn = modifiedLine.length + 1; - while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) { - const originalChar = originalLine.charCodeAt(originalEndColumn - 1); - const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1); - if (originalChar !== modifiedChar) { + let w = yr(f, 1), b = yr(g, 1); + const y = f.length + 1, A = g.length + 1; + for (; w < y && b < A; ) { + const C = f.charCodeAt(w - 1), R = f.charCodeAt(b - 1); + if (C !== R) break; - } - originalEndColumn++; - modifiedEndColumn++; - } - if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) { - this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn); + w++, b++; } + (w < y || b < A) && this._pushTrimWhitespaceCharChange(i, a + 1, w, y, o + 1, b, A); } } - originalLineIndex++; - modifiedLineIndex++; - } - if (nextChange) { - result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); - originalLineIndex += nextChange.originalLength; - modifiedLineIndex += nextChange.modifiedLength; + a++, o++; } + c && (i.push(Vt.createFromDiffResult(this.shouldIgnoreTrimWhitespace, c, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)), a += c.originalLength, o += c.modifiedLength); } return { - quitEarly, - changes: result + quitEarly: r, + changes: i }; } - _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { - if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) { + _pushTrimWhitespaceCharChange(t, n, r, i, a, o, l) { + if (this._mergeTrimWhitespaceCharChange(t, n, r, i, a, o, l)) return; - } - let charChanges = void 0; - if (this.shouldComputeCharChanges) { - charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)]; - } - result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges)); + let h; + this.shouldComputeCharChanges && (h = [new jt(n, r, n, i, a, o, a, l)]), t.push(new Vt(n, n, a, a, h)); } - _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { - const len = result.length; - if (len === 0) { - return false; - } - const prevChange = result[len - 1]; - if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) { - return false; - } - if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) { - prevChange.originalEndLineNumber = originalLineNumber; - prevChange.modifiedEndLineNumber = modifiedLineNumber; - if (this.shouldComputeCharChanges && prevChange.charChanges) { - prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); - } - return true; - } - return false; + _mergeTrimWhitespaceCharChange(t, n, r, i, a, o, l) { + const h = t.length; + if (h === 0) + return !1; + const c = t[h - 1]; + return c.originalEndLineNumber === 0 || c.modifiedEndLineNumber === 0 ? !1 : c.originalEndLineNumber + 1 === n && c.modifiedEndLineNumber + 1 === a ? (c.originalEndLineNumber = n, c.modifiedEndLineNumber = a, this.shouldComputeCharChanges && c.charChanges && c.charChanges.push(new jt(n, r, n, i, a, o, a, l)), !0) : !1; } } -function getFirstNonBlankColumn(txt, defaultValue) { - const r = firstNonWhitespaceIndex(txt); - if (r === -1) { - return defaultValue; - } - return r + 1; +function vr(e, t) { + const n = il(e); + return n === -1 ? t : n + 1; } -function getLastNonBlankColumn(txt, defaultValue) { - const r = lastNonWhitespaceIndex(txt); - if (r === -1) { - return defaultValue; - } - return r + 2; +function yr(e, t) { + const n = al(e); + return n === -1 ? t : n + 2; } -function createContinueProcessingPredicate(maximumRuntime) { - if (maximumRuntime === 0) { - return () => true; - } - const startTime = Date.now(); - return () => { - return Date.now() - startTime < maximumRuntime; - }; +function Ai(e) { + if (e === 0) + return () => !0; + const t = Date.now(); + return () => Date.now() - t < e; } -function toUint8(v) { - if (v < 0) { - return 0; - } - if (v > 255) { - return 255; - } - return v | 0; +function zi(e) { + return e < 0 ? 0 : e > 255 ? 255 : e | 0; } -function toUint32(v) { - if (v < 0) { - return 0; - } - if (v > 4294967295) { - return 4294967295; - } - return v | 0; +function ft(e) { + return e < 0 ? 0 : e > 4294967295 ? 4294967295 : e | 0; } -class PrefixSumComputer { - constructor(values2) { - this.values = values2; - this.prefixSum = new Uint32Array(values2.length); - this.prefixSumValidIndex = new Int32Array(1); - this.prefixSumValidIndex[0] = -1; +class Wl { + constructor(t) { + this.values = t, this.prefixSum = new Uint32Array(t.length), this.prefixSumValidIndex = new Int32Array(1), this.prefixSumValidIndex[0] = -1; } - insertValues(insertIndex, insertValues) { - insertIndex = toUint32(insertIndex); - const oldValues = this.values; - const oldPrefixSum = this.prefixSum; - const insertValuesLen = insertValues.length; - if (insertValuesLen === 0) { - return false; - } - this.values = new Uint32Array(oldValues.length + insertValuesLen); - this.values.set(oldValues.subarray(0, insertIndex), 0); - this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen); - this.values.set(insertValues, insertIndex); - if (insertIndex - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = insertIndex - 1; - } - this.prefixSum = new Uint32Array(this.values.length); - if (this.prefixSumValidIndex[0] >= 0) { - this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1)); - } - return true; + insertValues(t, n) { + t = ft(t); + const r = this.values, i = this.prefixSum, a = n.length; + return a === 0 ? !1 : (this.values = new Uint32Array(r.length + a), this.values.set(r.subarray(0, t), 0), this.values.set(r.subarray(t), t + a), this.values.set(n, t), t - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), this.prefixSum = new Uint32Array(this.values.length), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(i.subarray(0, this.prefixSumValidIndex[0] + 1)), !0); } - setValue(index, value) { - index = toUint32(index); - value = toUint32(value); - if (this.values[index] === value) { - return false; - } - this.values[index] = value; - if (index - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = index - 1; - } - return true; + setValue(t, n) { + return t = ft(t), n = ft(n), this.values[t] === n ? !1 : (this.values[t] = n, t - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), !0); } - removeValues(startIndex, count) { - startIndex = toUint32(startIndex); - count = toUint32(count); - const oldValues = this.values; - const oldPrefixSum = this.prefixSum; - if (startIndex >= oldValues.length) { - return false; - } - const maxCount = oldValues.length - startIndex; - if (count >= maxCount) { - count = maxCount; - } - if (count === 0) { - return false; - } - this.values = new Uint32Array(oldValues.length - count); - this.values.set(oldValues.subarray(0, startIndex), 0); - this.values.set(oldValues.subarray(startIndex + count), startIndex); - this.prefixSum = new Uint32Array(this.values.length); - if (startIndex - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = startIndex - 1; - } - if (this.prefixSumValidIndex[0] >= 0) { - this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1)); - } - return true; + removeValues(t, n) { + t = ft(t), n = ft(n); + const r = this.values, i = this.prefixSum; + if (t >= r.length) + return !1; + const a = r.length - t; + return n >= a && (n = a), n === 0 ? !1 : (this.values = new Uint32Array(r.length - n), this.values.set(r.subarray(0, t), 0), this.values.set(r.subarray(t + n), t), this.prefixSum = new Uint32Array(this.values.length), t - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(i.subarray(0, this.prefixSumValidIndex[0] + 1)), !0); } getTotalSum() { - if (this.values.length === 0) { - return 0; - } - return this._getPrefixSum(this.values.length - 1); + return this.values.length === 0 ? 0 : this._getPrefixSum(this.values.length - 1); } - getPrefixSum(index) { - if (index < 0) { - return 0; - } - index = toUint32(index); - return this._getPrefixSum(index); + getPrefixSum(t) { + return t < 0 ? 0 : (t = ft(t), this._getPrefixSum(t)); } - _getPrefixSum(index) { - if (index <= this.prefixSumValidIndex[0]) { - return this.prefixSum[index]; - } - let startIndex = this.prefixSumValidIndex[0] + 1; - if (startIndex === 0) { - this.prefixSum[0] = this.values[0]; - startIndex++; - } - if (index >= this.values.length) { - index = this.values.length - 1; - } - for (let i = startIndex; i <= index; i++) { - this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i]; - } - this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index); - return this.prefixSum[index]; + _getPrefixSum(t) { + if (t <= this.prefixSumValidIndex[0]) + return this.prefixSum[t]; + let n = this.prefixSumValidIndex[0] + 1; + n === 0 && (this.prefixSum[0] = this.values[0], n++), t >= this.values.length && (t = this.values.length - 1); + for (let r = n; r <= t; r++) + this.prefixSum[r] = this.prefixSum[r - 1] + this.values[r]; + return this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], t), this.prefixSum[t]; } - getIndexOf(sum) { - sum = Math.floor(sum); - this.getTotalSum(); - let low = 0; - let high = this.values.length - 1; - let mid = 0; - let midStop = 0; - let midStart = 0; - while (low <= high) { - mid = low + (high - low) / 2 | 0; - midStop = this.prefixSum[mid]; - midStart = midStop - this.values[mid]; - if (sum < midStart) { - high = mid - 1; - } else if (sum >= midStop) { - low = mid + 1; - } else { + getIndexOf(t) { + t = Math.floor(t), this.getTotalSum(); + let n = 0, r = this.values.length - 1, i = 0, a = 0, o = 0; + for (; n <= r; ) + if (i = n + (r - n) / 2 | 0, a = this.prefixSum[i], o = a - this.values[i], t < o) + r = i - 1; + else if (t >= a) + n = i + 1; + else break; - } - } - return new PrefixSumIndexOfResult(mid, sum - midStart); + return new Ol(i, t - o); } } -class PrefixSumIndexOfResult { - constructor(index, remainder) { - this.index = index; - this.remainder = remainder; - this._prefixSumIndexOfResultBrand = void 0; - this.index = index; - this.remainder = remainder; +class Ol { + constructor(t, n) { + this.index = t, this.remainder = n, this._prefixSumIndexOfResultBrand = void 0, this.index = t, this.remainder = n; } } -class MirrorTextModel { - constructor(uri, lines, eol, versionId) { - this._uri = uri; - this._lines = lines; - this._eol = eol; - this._versionId = versionId; - this._lineStarts = null; - this._cachedTextValue = null; +class Vl { + constructor(t, n, r, i) { + this._uri = t, this._lines = n, this._eol = r, this._versionId = i, this._lineStarts = null, this._cachedTextValue = null; } dispose() { this._lines.length = 0; @@ -4400,434 +2581,292 @@ class MirrorTextModel { return this._versionId; } getText() { - if (this._cachedTextValue === null) { - this._cachedTextValue = this._lines.join(this._eol); - } - return this._cachedTextValue; + return this._cachedTextValue === null && (this._cachedTextValue = this._lines.join(this._eol)), this._cachedTextValue; } - onEvents(e) { - if (e.eol && e.eol !== this._eol) { - this._eol = e.eol; - this._lineStarts = null; - } - const changes = e.changes; - for (const change of changes) { - this._acceptDeleteRange(change.range); - this._acceptInsertText(new Position$1(change.range.startLineNumber, change.range.startColumn), change.text); - } - this._versionId = e.versionId; - this._cachedTextValue = null; + onEvents(t) { + t.eol && t.eol !== this._eol && (this._eol = t.eol, this._lineStarts = null); + const n = t.changes; + for (const r of n) + this._acceptDeleteRange(r.range), this._acceptInsertText(new we(r.range.startLineNumber, r.range.startColumn), r.text); + this._versionId = t.versionId, this._cachedTextValue = null; } _ensureLineStarts() { if (!this._lineStarts) { - const eolLength = this._eol.length; - const linesLength = this._lines.length; - const lineStartValues = new Uint32Array(linesLength); - for (let i = 0; i < linesLength; i++) { - lineStartValues[i] = this._lines[i].length + eolLength; - } - this._lineStarts = new PrefixSumComputer(lineStartValues); + const t = this._eol.length, n = this._lines.length, r = new Uint32Array(n); + for (let i = 0; i < n; i++) + r[i] = this._lines[i].length + t; + this._lineStarts = new Wl(r); } } - _setLineText(lineIndex, newValue) { - this._lines[lineIndex] = newValue; - if (this._lineStarts) { - this._lineStarts.setValue(lineIndex, this._lines[lineIndex].length + this._eol.length); - } + _setLineText(t, n) { + this._lines[t] = n, this._lineStarts && this._lineStarts.setValue(t, this._lines[t].length + this._eol.length); } - _acceptDeleteRange(range) { - if (range.startLineNumber === range.endLineNumber) { - if (range.startColumn === range.endColumn) { + _acceptDeleteRange(t) { + if (t.startLineNumber === t.endLineNumber) { + if (t.startColumn === t.endColumn) return; - } - this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1)); + this._setLineText(t.startLineNumber - 1, this._lines[t.startLineNumber - 1].substring(0, t.startColumn - 1) + this._lines[t.startLineNumber - 1].substring(t.endColumn - 1)); return; } - this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1)); - this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber); - if (this._lineStarts) { - this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber); - } + this._setLineText(t.startLineNumber - 1, this._lines[t.startLineNumber - 1].substring(0, t.startColumn - 1) + this._lines[t.endLineNumber - 1].substring(t.endColumn - 1)), this._lines.splice(t.startLineNumber, t.endLineNumber - t.startLineNumber), this._lineStarts && this._lineStarts.removeValues(t.startLineNumber, t.endLineNumber - t.startLineNumber); } - _acceptInsertText(position, insertText) { - if (insertText.length === 0) { + _acceptInsertText(t, n) { + if (n.length === 0) + return; + const r = rl(n); + if (r.length === 1) { + this._setLineText(t.lineNumber - 1, this._lines[t.lineNumber - 1].substring(0, t.column - 1) + r[0] + this._lines[t.lineNumber - 1].substring(t.column - 1)); return; } - const insertLines = splitLines(insertText); - if (insertLines.length === 1) { - this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0] + this._lines[position.lineNumber - 1].substring(position.column - 1)); - return; - } - insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1); - this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0]); - const newLengths = new Uint32Array(insertLines.length - 1); - for (let i = 1; i < insertLines.length; i++) { - this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]); - newLengths[i - 1] = insertLines[i].length + this._eol.length; - } - if (this._lineStarts) { - this._lineStarts.insertValues(position.lineNumber, newLengths); - } + r[r.length - 1] += this._lines[t.lineNumber - 1].substring(t.column - 1), this._setLineText(t.lineNumber - 1, this._lines[t.lineNumber - 1].substring(0, t.column - 1) + r[0]); + const i = new Uint32Array(r.length - 1); + for (let a = 1; a < r.length; a++) + this._lines.splice(t.lineNumber + a - 1, 0, r[a]), i[a - 1] = r[a].length + this._eol.length; + this._lineStarts && this._lineStarts.insertValues(t.lineNumber, i); } } -const USUAL_WORD_SEPARATORS = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; -function createWordRegExp(allowInWords = "") { - let source = "(-?\\d*\\.\\d\\w*)|([^"; - for (const sep of USUAL_WORD_SEPARATORS) { - if (allowInWords.indexOf(sep) >= 0) { - continue; - } - source += "\\" + sep; - } - source += "\\s]+)"; - return new RegExp(source, "g"); +const Ul = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; +function Bl(e = "") { + let t = "(-?\\d*\\.\\d\\w*)|([^"; + for (const n of Ul) + e.indexOf(n) >= 0 || (t += "\\" + n); + return t += "\\s]+)", new RegExp(t, "g"); } -const DEFAULT_WORD_REGEXP = createWordRegExp(); -function ensureValidWordDefinition(wordDefinition) { - let result = DEFAULT_WORD_REGEXP; - if (wordDefinition && wordDefinition instanceof RegExp) { - if (!wordDefinition.global) { - let flags = "g"; - if (wordDefinition.ignoreCase) { - flags += "i"; - } - if (wordDefinition.multiline) { - flags += "m"; - } - if (wordDefinition.unicode) { - flags += "u"; - } - result = new RegExp(wordDefinition.source, flags); - } else { - result = wordDefinition; +const no = Bl(); +function jl(e) { + let t = no; + 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); } - } - result.lastIndex = 0; - return result; + return t.lastIndex = 0, t; } -const _defaultConfig = { +const ql = { maxLen: 1e3, windowSize: 15, timeBudget: 150 }; -function getWordAtText(column, wordDefinition, text, textOffset, config = _defaultConfig) { - if (text.length > config.maxLen) { - let start = column - config.maxLen / 2; - if (start < 0) { - start = 0; - } else { - textOffset += start; - } - text = text.substring(start, column + config.maxLen / 2); - return getWordAtText(column, wordDefinition, text, textOffset, config); +function Kr(e, t, n, r, i = ql) { + if (n.length > i.maxLen) { + let c = e - i.maxLen / 2; + return c < 0 ? c = 0 : r += c, n = n.substring(c, e + i.maxLen / 2), Kr(e, t, n, r, i); } - const t1 = Date.now(); - const pos = column - 1 - textOffset; - let prevRegexIndex = -1; - let match = null; - for (let i = 1; ; i++) { - if (Date.now() - t1 >= config.timeBudget) { + const a = Date.now(), o = e - 1 - r; + let l = -1, h = null; + for (let c = 1; !(Date.now() - a >= i.timeBudget); c++) { + const d = o - i.windowSize * c; + t.lastIndex = Math.max(0, d); + const p = $l(t, n, o, l); + if (!p && h || (h = p, d <= 0)) break; - } - const regexIndex = pos - config.windowSize * i; - wordDefinition.lastIndex = Math.max(0, regexIndex); - const thisMatch = _findRegexMatchEnclosingPosition(wordDefinition, text, pos, prevRegexIndex); - if (!thisMatch && match) { - break; - } - match = thisMatch; - if (regexIndex <= 0) { - break; - } - prevRegexIndex = regexIndex; + l = d; } - if (match) { - const result = { - word: match[0], - startColumn: textOffset + 1 + match.index, - endColumn: textOffset + 1 + match.index + match[0].length + if (h) { + const c = { + word: h[0], + startColumn: r + 1 + h.index, + endColumn: r + 1 + h.index + h[0].length }; - wordDefinition.lastIndex = 0; - return result; + return t.lastIndex = 0, c; } return null; } -function _findRegexMatchEnclosingPosition(wordDefinition, text, pos, stopPos) { - let match; - while (match = wordDefinition.exec(text)) { - const matchIndex = match.index || 0; - if (matchIndex <= pos && wordDefinition.lastIndex >= pos) { - return match; - } else if (stopPos > 0 && matchIndex > stopPos) { +function $l(e, t, n, r) { + let i; + for (; i = e.exec(t); ) { + const a = i.index || 0; + if (a <= n && e.lastIndex >= n) + return i; + if (r > 0 && a > r) return null; - } } return null; } -class CharacterClassifier { - constructor(_defaultValue) { - const defaultValue = toUint8(_defaultValue); - this._defaultValue = defaultValue; - this._asciiMap = CharacterClassifier._createAsciiMap(defaultValue); - this._map = /* @__PURE__ */ new Map(); +class Zr { + constructor(t) { + const n = zi(t); + this._defaultValue = n, this._asciiMap = Zr._createAsciiMap(n), this._map = /* @__PURE__ */ new Map(); } - static _createAsciiMap(defaultValue) { - const asciiMap = new Uint8Array(256); - for (let i = 0; i < 256; i++) { - asciiMap[i] = defaultValue; - } - return asciiMap; + static _createAsciiMap(t) { + const n = new Uint8Array(256); + for (let r = 0; r < 256; r++) + n[r] = t; + return n; } - set(charCode, _value) { - const value = toUint8(_value); - if (charCode >= 0 && charCode < 256) { - this._asciiMap[charCode] = value; - } else { - this._map.set(charCode, value); - } + set(t, n) { + const r = zi(n); + t >= 0 && t < 256 ? this._asciiMap[t] = r : this._map.set(t, r); } - get(charCode) { - if (charCode >= 0 && charCode < 256) { - return this._asciiMap[charCode]; - } else { - return this._map.get(charCode) || this._defaultValue; - } + get(t) { + return t >= 0 && t < 256 ? this._asciiMap[t] : this._map.get(t) || this._defaultValue; } } -class Uint8Matrix { - constructor(rows, cols, defaultValue) { - const data = new Uint8Array(rows * cols); - for (let i = 0, len = rows * cols; i < len; i++) { - data[i] = defaultValue; - } - this._data = data; - this.rows = rows; - this.cols = cols; +class Hl { + constructor(t, n, r) { + const i = new Uint8Array(t * n); + for (let a = 0, o = t * n; a < o; a++) + i[a] = r; + this._data = i, this.rows = t, this.cols = n; } - get(row, col) { - return this._data[row * this.cols + col]; + get(t, n) { + return this._data[t * this.cols + n]; } - set(row, col, value) { - this._data[row * this.cols + col] = value; + set(t, n, r) { + this._data[t * this.cols + n] = r; } } -class StateMachine { - constructor(edges) { - let maxCharCode = 0; - let maxState = 0; - for (let i = 0, len = edges.length; i < len; i++) { - const [from, chCode, to] = edges[i]; - if (chCode > maxCharCode) { - maxCharCode = chCode; - } - if (from > maxState) { - maxState = from; - } - if (to > maxState) { - maxState = to; - } +class Gl { + constructor(t) { + let n = 0, r = 0; + for (let a = 0, o = t.length; a < o; a++) { + const [l, h, c] = t[a]; + h > n && (n = h), l > r && (r = l), c > r && (r = c); } - maxCharCode++; - maxState++; - const states = new Uint8Matrix(maxState, maxCharCode, 0); - for (let i = 0, len = edges.length; i < len; i++) { - const [from, chCode, to] = edges[i]; - states.set(from, chCode, to); + n++, r++; + const i = new Hl(r, n, 0); + for (let a = 0, o = t.length; a < o; a++) { + const [l, h, c] = t[a]; + i.set(l, h, c); } - this._states = states; - this._maxCharCode = maxCharCode; + this._states = i, this._maxCharCode = n; } - nextState(currentState, chCode) { - if (chCode < 0 || chCode >= this._maxCharCode) { - return 0; - } - return this._states.get(currentState, chCode); + nextState(t, n) { + return n < 0 || n >= this._maxCharCode ? 0 : this._states.get(t, n); } } -let _stateMachine = null; -function getStateMachine() { - if (_stateMachine === null) { - _stateMachine = new StateMachine([ - [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] - ]); - } - return _stateMachine; +let $n = null; +function Jl() { + return $n === null && ($n = new Gl([ + [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] + ])), $n; } -let _classifier = null; -function getClassifier() { - if (_classifier === null) { - _classifier = new CharacterClassifier(0); - const FORCE_TERMINATION_CHARACTERS = ` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`; - for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) { - _classifier.set(FORCE_TERMINATION_CHARACTERS.charCodeAt(i), 1); - } - const CANNOT_END_WITH_CHARACTERS = ".,;"; - for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) { - _classifier.set(CANNOT_END_WITH_CHARACTERS.charCodeAt(i), 2); - } +let Mt = null; +function Xl() { + if (Mt === null) { + Mt = new Zr(0); + const e = ` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`; + for (let n = 0; n < e.length; n++) + Mt.set(e.charCodeAt(n), 1); + const t = ".,;"; + for (let n = 0; n < t.length; n++) + Mt.set(t.charCodeAt(n), 2); } - return _classifier; + return Mt; } -class LinkComputer { - static _createLink(classifier, line, lineNumber, linkBeginIndex, linkEndIndex) { - let lastIncludedCharIndex = linkEndIndex - 1; +class Sn { + static _createLink(t, n, r, i, a) { + let o = a - 1; do { - const chCode = line.charCodeAt(lastIncludedCharIndex); - const chClass = classifier.get(chCode); - if (chClass !== 2) { + const l = n.charCodeAt(o); + if (t.get(l) !== 2) break; - } - lastIncludedCharIndex--; - } while (lastIncludedCharIndex > linkBeginIndex); - if (linkBeginIndex > 0) { - const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1); - const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex); - if (charCodeBeforeLink === 40 && lastCharCodeInLink === 41 || charCodeBeforeLink === 91 && lastCharCodeInLink === 93 || charCodeBeforeLink === 123 && lastCharCodeInLink === 125) { - lastIncludedCharIndex--; - } + o--; + } while (o > i); + if (i > 0) { + const l = n.charCodeAt(i - 1), h = n.charCodeAt(o); + (l === 40 && h === 41 || l === 91 && h === 93 || l === 123 && h === 125) && o--; } return { range: { - startLineNumber: lineNumber, - startColumn: linkBeginIndex + 1, - endLineNumber: lineNumber, - endColumn: lastIncludedCharIndex + 2 + startLineNumber: r, + startColumn: i + 1, + endLineNumber: r, + endColumn: o + 2 }, - url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1) + url: n.substring(i, o + 1) }; } - static computeLinks(model, stateMachine = getStateMachine()) { - const classifier = getClassifier(); - const result = []; - for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) { - const line = model.getLineContent(i); - const len = line.length; - let j = 0; - let linkBeginIndex = 0; - let linkBeginChCode = 0; - let state = 1; - let hasOpenParens = false; - let hasOpenSquareBracket = false; - let inSquareBrackets = false; - let hasOpenCurlyBracket = false; - while (j < len) { - let resetStateMachine = false; - const chCode = line.charCodeAt(j); - if (state === 13) { - let chClass; - switch (chCode) { + static computeLinks(t, n = Jl()) { + const r = Xl(), i = []; + for (let a = 1, o = t.getLineCount(); a <= o; a++) { + const l = t.getLineContent(a), h = l.length; + let c = 0, d = 0, p = 0, f = 1, g = !1, w = !1, b = !1, y = !1; + for (; c < h; ) { + let A = !1; + const C = l.charCodeAt(c); + if (f === 13) { + let R; + switch (C) { case 40: - hasOpenParens = true; - chClass = 0; + g = !0, R = 0; break; case 41: - chClass = hasOpenParens ? 0 : 1; + R = g ? 0 : 1; break; case 91: - inSquareBrackets = true; - hasOpenSquareBracket = true; - chClass = 0; + b = !0, w = !0, R = 0; break; case 93: - inSquareBrackets = false; - chClass = hasOpenSquareBracket ? 0 : 1; + b = !1, R = w ? 0 : 1; break; case 123: - hasOpenCurlyBracket = true; - chClass = 0; + y = !0, R = 0; break; case 125: - chClass = hasOpenCurlyBracket ? 0 : 1; + R = y ? 0 : 1; break; case 39: - chClass = linkBeginChCode === 34 || linkBeginChCode === 96 ? 0 : 1; + R = p === 34 || p === 96 ? 0 : 1; break; case 34: - chClass = linkBeginChCode === 39 || linkBeginChCode === 96 ? 0 : 1; + R = p === 39 || p === 96 ? 0 : 1; break; case 96: - chClass = linkBeginChCode === 39 || linkBeginChCode === 34 ? 0 : 1; + R = p === 39 || p === 34 ? 0 : 1; break; case 42: - chClass = linkBeginChCode === 42 ? 1 : 0; + R = p === 42 ? 1 : 0; break; case 124: - chClass = linkBeginChCode === 124 ? 1 : 0; + R = p === 124 ? 1 : 0; break; case 32: - chClass = inSquareBrackets ? 0 : 1; + R = b ? 0 : 1; break; default: - chClass = classifier.get(chCode); + R = r.get(C); } - if (chClass === 1) { - result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, j)); - resetStateMachine = true; - } - } else if (state === 12) { - let chClass; - if (chCode === 91) { - hasOpenSquareBracket = true; - chClass = 0; - } else { - chClass = classifier.get(chCode); - } - if (chClass === 1) { - resetStateMachine = true; - } else { - state = 13; - } - } else { - state = stateMachine.nextState(state, chCode); - if (state === 0) { - resetStateMachine = true; - } - } - if (resetStateMachine) { - state = 1; - hasOpenParens = false; - hasOpenSquareBracket = false; - hasOpenCurlyBracket = false; - linkBeginIndex = j + 1; - linkBeginChCode = chCode; - } - j++; - } - if (state === 13) { - result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, len)); + R === 1 && (i.push(Sn._createLink(r, l, a, d, c)), A = !0); + } else if (f === 12) { + let R; + C === 91 ? (w = !0, R = 0) : R = r.get(C), R === 1 ? A = !0 : f = 13; + } else + f = n.nextState(f, C), f === 0 && (A = !0); + A && (f = 1, g = !1, w = !1, y = !1, d = c + 1, p = C), c++; } + f === 13 && i.push(Sn._createLink(r, l, a, d, h)); } - return result; + return i; } } -function computeLinks(model) { - if (!model || typeof model.getLineCount !== "function" || typeof model.getLineContent !== "function") { - return []; - } - return LinkComputer.computeLinks(model); +function Yl(e) { + return !e || typeof e.getLineCount != "function" || typeof e.getLineContent != "function" ? [] : Sn.computeLinks(e); } -class BasicInplaceReplace { +class wr { constructor() { this._defaultValueSet = [ ["true", "false"], @@ -4836,475 +2875,383 @@ class BasicInplaceReplace { ["public", "protected", "private"] ]; } - navigateValueSet(range1, text1, range2, text2, up) { - if (range1 && text1) { - const result = this.doNavigateValueSet(text1, up); - if (result) { + navigateValueSet(t, n, r, i, a) { + if (t && n) { + const o = this.doNavigateValueSet(n, a); + if (o) return { - range: range1, - value: result + range: t, + value: o }; - } } - if (range2 && text2) { - const result = this.doNavigateValueSet(text2, up); - if (result) { + if (r && i) { + const o = this.doNavigateValueSet(i, a); + if (o) return { - range: range2, - value: result + range: r, + value: o }; - } } return null; } - doNavigateValueSet(text, up) { - const numberResult = this.numberReplace(text, up); - if (numberResult !== null) { - return numberResult; - } - return this.textReplace(text, up); + doNavigateValueSet(t, n) { + const r = this.numberReplace(t, n); + return r !== null ? r : this.textReplace(t, n); } - numberReplace(value, up) { - const precision = Math.pow(10, value.length - (value.lastIndexOf(".") + 1)); - let n1 = Number(value); - let n2 = parseFloat(value); - if (!isNaN(n1) && !isNaN(n2) && n1 === n2) { - if (n1 === 0 && !up) { - return null; - } else { - n1 = Math.floor(n1 * precision); - n1 += up ? precision : -precision; - return String(n1 / precision); - } - } - return null; + numberReplace(t, n) { + const r = Math.pow(10, t.length - (t.lastIndexOf(".") + 1)); + let i = Number(t), a = parseFloat(t); + return !isNaN(i) && !isNaN(a) && i === a ? i === 0 && !n ? null : (i = Math.floor(i * r), i += n ? r : -r, String(i / r)) : null; } - textReplace(value, up) { - return this.valueSetsReplace(this._defaultValueSet, value, up); + textReplace(t, n) { + return this.valueSetsReplace(this._defaultValueSet, t, n); } - valueSetsReplace(valueSets, value, up) { - let result = null; - for (let i = 0, len = valueSets.length; result === null && i < len; i++) { - result = this.valueSetReplace(valueSets[i], value, up); - } - return result; + valueSetsReplace(t, n, r) { + let i = null; + for (let a = 0, o = t.length; i === null && a < o; a++) + i = this.valueSetReplace(t[a], n, r); + return i; } - valueSetReplace(valueSet, value, up) { - let idx = valueSet.indexOf(value); - if (idx >= 0) { - idx += up ? 1 : -1; - if (idx < 0) { - idx = valueSet.length - 1; - } else { - idx %= valueSet.length; - } - return valueSet[idx]; - } - return null; + valueSetReplace(t, n, r) { + let i = t.indexOf(n); + return i >= 0 ? (i += r ? 1 : -1, i < 0 ? i = t.length - 1 : i %= t.length, t[i]) : null; } } -BasicInplaceReplace.INSTANCE = new BasicInplaceReplace(); -const shortcutEvent = Object.freeze(function(callback, context) { - const handle = setTimeout(callback.bind(context), 0); +wr.INSTANCE = new wr(); +const ro = Object.freeze(function(e, t) { + const n = setTimeout(e.bind(t), 0); return { dispose() { - clearTimeout(handle); + clearTimeout(n); } }; }); -var CancellationToken; -(function(CancellationToken2) { - function isCancellationToken(thing) { - if (thing === CancellationToken2.None || thing === CancellationToken2.Cancelled) { - return true; - } - if (thing instanceof MutableToken) { - return true; - } - if (!thing || typeof thing !== "object") { - return false; - } - return typeof thing.isCancellationRequested === "boolean" && typeof thing.onCancellationRequested === "function"; +var Cn; +(function(e) { + function t(n) { + return n === e.None || n === e.Cancelled || n instanceof bn ? !0 : !n || typeof n != "object" ? !1 : typeof n.isCancellationRequested == "boolean" && typeof n.onCancellationRequested == "function"; } - CancellationToken2.isCancellationToken = isCancellationToken; - CancellationToken2.None = Object.freeze({ - isCancellationRequested: false, - onCancellationRequested: Event.None + e.isCancellationToken = t, e.None = Object.freeze({ + isCancellationRequested: !1, + onCancellationRequested: dr.None + }), e.Cancelled = Object.freeze({ + isCancellationRequested: !0, + onCancellationRequested: ro }); - CancellationToken2.Cancelled = Object.freeze({ - isCancellationRequested: true, - onCancellationRequested: shortcutEvent - }); -})(CancellationToken || (CancellationToken = {})); -class MutableToken { +})(Cn || (Cn = {})); +class bn { constructor() { - this._isCancelled = false; - this._emitter = null; + this._isCancelled = !1, this._emitter = null; } cancel() { - if (!this._isCancelled) { - this._isCancelled = true; - if (this._emitter) { - this._emitter.fire(void 0); - this.dispose(); - } - } + this._isCancelled || (this._isCancelled = !0, this._emitter && (this._emitter.fire(void 0), this.dispose())); } get isCancellationRequested() { return this._isCancelled; } get onCancellationRequested() { - if (this._isCancelled) { - return shortcutEvent; - } - if (!this._emitter) { - this._emitter = new Emitter(); - } - return this._emitter.event; + return this._isCancelled ? ro : (this._emitter || (this._emitter = new He()), this._emitter.event); } dispose() { - if (this._emitter) { - this._emitter.dispose(); - this._emitter = null; - } + this._emitter && (this._emitter.dispose(), this._emitter = null); } } -class CancellationTokenSource { - constructor(parent) { - this._token = void 0; - this._parentListener = void 0; - this._parentListener = parent && parent.onCancellationRequested(this.cancel, this); +class Kl { + constructor(t) { + this._token = void 0, this._parentListener = void 0, this._parentListener = t && t.onCancellationRequested(this.cancel, this); } get token() { - if (!this._token) { - this._token = new MutableToken(); - } - return this._token; + return this._token || (this._token = new bn()), this._token; } cancel() { - if (!this._token) { - this._token = CancellationToken.Cancelled; - } else if (this._token instanceof MutableToken) { - this._token.cancel(); - } + this._token ? this._token instanceof bn && this._token.cancel() : this._token = Cn.Cancelled; } - dispose(cancel = false) { - if (cancel) { - this.cancel(); - } - if (this._parentListener) { - this._parentListener.dispose(); - } - if (!this._token) { - this._token = CancellationToken.None; - } else if (this._token instanceof MutableToken) { - this._token.dispose(); - } + dispose(t = !1) { + t && this.cancel(), this._parentListener && this._parentListener.dispose(), this._token ? this._token instanceof bn && this._token.dispose() : this._token = Cn.None; } } -class KeyCodeStrMap { +class Qr { constructor() { - this._keyCodeToStr = []; - this._strToKeyCode = /* @__PURE__ */ Object.create(null); + this._keyCodeToStr = [], this._strToKeyCode = /* @__PURE__ */ Object.create(null); } - define(keyCode, str) { - this._keyCodeToStr[keyCode] = str; - this._strToKeyCode[str.toLowerCase()] = keyCode; + define(t, n) { + this._keyCodeToStr[t] = n, this._strToKeyCode[n.toLowerCase()] = t; } - keyCodeToStr(keyCode) { - return this._keyCodeToStr[keyCode]; + keyCodeToStr(t) { + return this._keyCodeToStr[t]; } - strToKeyCode(str) { - return this._strToKeyCode[str.toLowerCase()] || 0; + strToKeyCode(t) { + return this._strToKeyCode[t.toLowerCase()] || 0; } } -const uiMap = new KeyCodeStrMap(); -const userSettingsUSMap = new KeyCodeStrMap(); -const userSettingsGeneralMap = new KeyCodeStrMap(); -const EVENT_KEY_CODE_MAP = new Array(230); -const scanCodeStrToInt = /* @__PURE__ */ Object.create(null); -const scanCodeLowerCaseStrToInt = /* @__PURE__ */ Object.create(null); +const vn = new Qr(), xr = new Qr(), Sr = new Qr(), Zl = new Array(230), Ql = /* @__PURE__ */ Object.create(null), ec = /* @__PURE__ */ Object.create(null); (function() { - const empty = ""; - const mappings = [ - [0, 1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", empty, empty], - [0, 1, 1, "Hyper", 0, empty, 0, empty, empty, empty], - [0, 1, 2, "Super", 0, empty, 0, empty, empty, empty], - [0, 1, 3, "Fn", 0, empty, 0, empty, empty, empty], - [0, 1, 4, "FnLock", 0, empty, 0, empty, empty, empty], - [0, 1, 5, "Suspend", 0, empty, 0, empty, empty, empty], - [0, 1, 6, "Resume", 0, empty, 0, empty, empty, empty], - [0, 1, 7, "Turbo", 0, empty, 0, empty, empty, empty], - [0, 1, 8, "Sleep", 0, empty, 0, "VK_SLEEP", empty, empty], - [0, 1, 9, "WakeUp", 0, empty, 0, empty, empty, empty], - [31, 0, 10, "KeyA", 31, "A", 65, "VK_A", empty, empty], - [32, 0, 11, "KeyB", 32, "B", 66, "VK_B", empty, empty], - [33, 0, 12, "KeyC", 33, "C", 67, "VK_C", empty, empty], - [34, 0, 13, "KeyD", 34, "D", 68, "VK_D", empty, empty], - [35, 0, 14, "KeyE", 35, "E", 69, "VK_E", empty, empty], - [36, 0, 15, "KeyF", 36, "F", 70, "VK_F", empty, empty], - [37, 0, 16, "KeyG", 37, "G", 71, "VK_G", empty, empty], - [38, 0, 17, "KeyH", 38, "H", 72, "VK_H", empty, empty], - [39, 0, 18, "KeyI", 39, "I", 73, "VK_I", empty, empty], - [40, 0, 19, "KeyJ", 40, "J", 74, "VK_J", empty, empty], - [41, 0, 20, "KeyK", 41, "K", 75, "VK_K", empty, empty], - [42, 0, 21, "KeyL", 42, "L", 76, "VK_L", empty, empty], - [43, 0, 22, "KeyM", 43, "M", 77, "VK_M", empty, empty], - [44, 0, 23, "KeyN", 44, "N", 78, "VK_N", empty, empty], - [45, 0, 24, "KeyO", 45, "O", 79, "VK_O", empty, empty], - [46, 0, 25, "KeyP", 46, "P", 80, "VK_P", empty, empty], - [47, 0, 26, "KeyQ", 47, "Q", 81, "VK_Q", empty, empty], - [48, 0, 27, "KeyR", 48, "R", 82, "VK_R", empty, empty], - [49, 0, 28, "KeyS", 49, "S", 83, "VK_S", empty, empty], - [50, 0, 29, "KeyT", 50, "T", 84, "VK_T", empty, empty], - [51, 0, 30, "KeyU", 51, "U", 85, "VK_U", empty, empty], - [52, 0, 31, "KeyV", 52, "V", 86, "VK_V", empty, empty], - [53, 0, 32, "KeyW", 53, "W", 87, "VK_W", empty, empty], - [54, 0, 33, "KeyX", 54, "X", 88, "VK_X", empty, empty], - [55, 0, 34, "KeyY", 55, "Y", 89, "VK_Y", empty, empty], - [56, 0, 35, "KeyZ", 56, "Z", 90, "VK_Z", empty, empty], - [22, 0, 36, "Digit1", 22, "1", 49, "VK_1", empty, empty], - [23, 0, 37, "Digit2", 23, "2", 50, "VK_2", empty, empty], - [24, 0, 38, "Digit3", 24, "3", 51, "VK_3", empty, empty], - [25, 0, 39, "Digit4", 25, "4", 52, "VK_4", empty, empty], - [26, 0, 40, "Digit5", 26, "5", 53, "VK_5", empty, empty], - [27, 0, 41, "Digit6", 27, "6", 54, "VK_6", empty, empty], - [28, 0, 42, "Digit7", 28, "7", 55, "VK_7", empty, empty], - [29, 0, 43, "Digit8", 29, "8", 56, "VK_8", empty, empty], - [30, 0, 44, "Digit9", 30, "9", 57, "VK_9", empty, empty], - [21, 0, 45, "Digit0", 21, "0", 48, "VK_0", empty, empty], - [3, 1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", empty, empty], - [9, 1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", empty, empty], - [1, 1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", empty, empty], - [2, 1, 49, "Tab", 2, "Tab", 9, "VK_TAB", empty, empty], - [10, 1, 50, "Space", 10, "Space", 32, "VK_SPACE", empty, empty], + const e = "", t = [ + [0, 1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", e, e], + [0, 1, 1, "Hyper", 0, e, 0, e, e, e], + [0, 1, 2, "Super", 0, e, 0, e, e, e], + [0, 1, 3, "Fn", 0, e, 0, e, e, e], + [0, 1, 4, "FnLock", 0, e, 0, e, e, e], + [0, 1, 5, "Suspend", 0, e, 0, e, e, e], + [0, 1, 6, "Resume", 0, e, 0, e, e, e], + [0, 1, 7, "Turbo", 0, e, 0, e, e, e], + [0, 1, 8, "Sleep", 0, e, 0, "VK_SLEEP", e, e], + [0, 1, 9, "WakeUp", 0, e, 0, e, e, e], + [31, 0, 10, "KeyA", 31, "A", 65, "VK_A", e, e], + [32, 0, 11, "KeyB", 32, "B", 66, "VK_B", e, e], + [33, 0, 12, "KeyC", 33, "C", 67, "VK_C", e, e], + [34, 0, 13, "KeyD", 34, "D", 68, "VK_D", e, e], + [35, 0, 14, "KeyE", 35, "E", 69, "VK_E", e, e], + [36, 0, 15, "KeyF", 36, "F", 70, "VK_F", e, e], + [37, 0, 16, "KeyG", 37, "G", 71, "VK_G", e, e], + [38, 0, 17, "KeyH", 38, "H", 72, "VK_H", e, e], + [39, 0, 18, "KeyI", 39, "I", 73, "VK_I", e, e], + [40, 0, 19, "KeyJ", 40, "J", 74, "VK_J", e, e], + [41, 0, 20, "KeyK", 41, "K", 75, "VK_K", e, e], + [42, 0, 21, "KeyL", 42, "L", 76, "VK_L", e, e], + [43, 0, 22, "KeyM", 43, "M", 77, "VK_M", e, e], + [44, 0, 23, "KeyN", 44, "N", 78, "VK_N", e, e], + [45, 0, 24, "KeyO", 45, "O", 79, "VK_O", e, e], + [46, 0, 25, "KeyP", 46, "P", 80, "VK_P", e, e], + [47, 0, 26, "KeyQ", 47, "Q", 81, "VK_Q", e, e], + [48, 0, 27, "KeyR", 48, "R", 82, "VK_R", e, e], + [49, 0, 28, "KeyS", 49, "S", 83, "VK_S", e, e], + [50, 0, 29, "KeyT", 50, "T", 84, "VK_T", e, e], + [51, 0, 30, "KeyU", 51, "U", 85, "VK_U", e, e], + [52, 0, 31, "KeyV", 52, "V", 86, "VK_V", e, e], + [53, 0, 32, "KeyW", 53, "W", 87, "VK_W", e, e], + [54, 0, 33, "KeyX", 54, "X", 88, "VK_X", e, e], + [55, 0, 34, "KeyY", 55, "Y", 89, "VK_Y", e, e], + [56, 0, 35, "KeyZ", 56, "Z", 90, "VK_Z", e, e], + [22, 0, 36, "Digit1", 22, "1", 49, "VK_1", e, e], + [23, 0, 37, "Digit2", 23, "2", 50, "VK_2", e, e], + [24, 0, 38, "Digit3", 24, "3", 51, "VK_3", e, e], + [25, 0, 39, "Digit4", 25, "4", 52, "VK_4", e, e], + [26, 0, 40, "Digit5", 26, "5", 53, "VK_5", e, e], + [27, 0, 41, "Digit6", 27, "6", 54, "VK_6", e, e], + [28, 0, 42, "Digit7", 28, "7", 55, "VK_7", e, e], + [29, 0, 43, "Digit8", 29, "8", 56, "VK_8", e, e], + [30, 0, 44, "Digit9", 30, "9", 57, "VK_9", e, e], + [21, 0, 45, "Digit0", 21, "0", 48, "VK_0", e, e], + [3, 1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", e, e], + [9, 1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", e, e], + [1, 1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", e, e], + [2, 1, 49, "Tab", 2, "Tab", 9, "VK_TAB", e, e], + [10, 1, 50, "Space", 10, "Space", 32, "VK_SPACE", e, e], [83, 0, 51, "Minus", 83, "-", 189, "VK_OEM_MINUS", "-", "OEM_MINUS"], [81, 0, 52, "Equal", 81, "=", 187, "VK_OEM_PLUS", "=", "OEM_PLUS"], [87, 0, 53, "BracketLeft", 87, "[", 219, "VK_OEM_4", "[", "OEM_4"], [89, 0, 54, "BracketRight", 89, "]", 221, "VK_OEM_6", "]", "OEM_6"], [88, 0, 55, "Backslash", 88, "\\", 220, "VK_OEM_5", "\\", "OEM_5"], - [0, 0, 56, "IntlHash", 0, empty, 0, empty, empty, empty], + [0, 0, 56, "IntlHash", 0, e, 0, e, e, e], [80, 0, 57, "Semicolon", 80, ";", 186, "VK_OEM_1", ";", "OEM_1"], [90, 0, 58, "Quote", 90, "'", 222, "VK_OEM_7", "'", "OEM_7"], [86, 0, 59, "Backquote", 86, "`", 192, "VK_OEM_3", "`", "OEM_3"], [82, 0, 60, "Comma", 82, ",", 188, "VK_OEM_COMMA", ",", "OEM_COMMA"], [84, 0, 61, "Period", 84, ".", 190, "VK_OEM_PERIOD", ".", "OEM_PERIOD"], [85, 0, 62, "Slash", 85, "/", 191, "VK_OEM_2", "/", "OEM_2"], - [8, 1, 63, "CapsLock", 8, "CapsLock", 20, "VK_CAPITAL", empty, empty], - [59, 1, 64, "F1", 59, "F1", 112, "VK_F1", empty, empty], - [60, 1, 65, "F2", 60, "F2", 113, "VK_F2", empty, empty], - [61, 1, 66, "F3", 61, "F3", 114, "VK_F3", empty, empty], - [62, 1, 67, "F4", 62, "F4", 115, "VK_F4", empty, empty], - [63, 1, 68, "F5", 63, "F5", 116, "VK_F5", empty, empty], - [64, 1, 69, "F6", 64, "F6", 117, "VK_F6", empty, empty], - [65, 1, 70, "F7", 65, "F7", 118, "VK_F7", empty, empty], - [66, 1, 71, "F8", 66, "F8", 119, "VK_F8", empty, empty], - [67, 1, 72, "F9", 67, "F9", 120, "VK_F9", empty, empty], - [68, 1, 73, "F10", 68, "F10", 121, "VK_F10", empty, empty], - [69, 1, 74, "F11", 69, "F11", 122, "VK_F11", empty, empty], - [70, 1, 75, "F12", 70, "F12", 123, "VK_F12", empty, empty], - [0, 1, 76, "PrintScreen", 0, empty, 0, empty, empty, empty], - [79, 1, 77, "ScrollLock", 79, "ScrollLock", 145, "VK_SCROLL", empty, empty], - [7, 1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", empty, empty], - [19, 1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", empty, empty], - [14, 1, 80, "Home", 14, "Home", 36, "VK_HOME", empty, empty], - [11, 1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", empty, empty], - [20, 1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", empty, empty], - [13, 1, 83, "End", 13, "End", 35, "VK_END", empty, empty], - [12, 1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", empty, empty], - [17, 1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", empty], - [15, 1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", empty], - [18, 1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", empty], - [16, 1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", empty], - [78, 1, 89, "NumLock", 78, "NumLock", 144, "VK_NUMLOCK", empty, empty], - [108, 1, 90, "NumpadDivide", 108, "NumPad_Divide", 111, "VK_DIVIDE", empty, empty], - [103, 1, 91, "NumpadMultiply", 103, "NumPad_Multiply", 106, "VK_MULTIPLY", empty, empty], - [106, 1, 92, "NumpadSubtract", 106, "NumPad_Subtract", 109, "VK_SUBTRACT", empty, empty], - [104, 1, 93, "NumpadAdd", 104, "NumPad_Add", 107, "VK_ADD", empty, empty], - [3, 1, 94, "NumpadEnter", 3, empty, 0, empty, empty, empty], - [94, 1, 95, "Numpad1", 94, "NumPad1", 97, "VK_NUMPAD1", empty, empty], - [95, 1, 96, "Numpad2", 95, "NumPad2", 98, "VK_NUMPAD2", empty, empty], - [96, 1, 97, "Numpad3", 96, "NumPad3", 99, "VK_NUMPAD3", empty, empty], - [97, 1, 98, "Numpad4", 97, "NumPad4", 100, "VK_NUMPAD4", empty, empty], - [98, 1, 99, "Numpad5", 98, "NumPad5", 101, "VK_NUMPAD5", empty, empty], - [99, 1, 100, "Numpad6", 99, "NumPad6", 102, "VK_NUMPAD6", empty, empty], - [100, 1, 101, "Numpad7", 100, "NumPad7", 103, "VK_NUMPAD7", empty, empty], - [101, 1, 102, "Numpad8", 101, "NumPad8", 104, "VK_NUMPAD8", empty, empty], - [102, 1, 103, "Numpad9", 102, "NumPad9", 105, "VK_NUMPAD9", empty, empty], - [93, 1, 104, "Numpad0", 93, "NumPad0", 96, "VK_NUMPAD0", empty, empty], - [107, 1, 105, "NumpadDecimal", 107, "NumPad_Decimal", 110, "VK_DECIMAL", empty, empty], - [92, 0, 106, "IntlBackslash", 92, "OEM_102", 226, "VK_OEM_102", empty, empty], - [58, 1, 107, "ContextMenu", 58, "ContextMenu", 93, empty, empty, empty], - [0, 1, 108, "Power", 0, empty, 0, empty, empty, empty], - [0, 1, 109, "NumpadEqual", 0, empty, 0, empty, empty, empty], - [71, 1, 110, "F13", 71, "F13", 124, "VK_F13", empty, empty], - [72, 1, 111, "F14", 72, "F14", 125, "VK_F14", empty, empty], - [73, 1, 112, "F15", 73, "F15", 126, "VK_F15", empty, empty], - [74, 1, 113, "F16", 74, "F16", 127, "VK_F16", empty, empty], - [75, 1, 114, "F17", 75, "F17", 128, "VK_F17", empty, empty], - [76, 1, 115, "F18", 76, "F18", 129, "VK_F18", empty, empty], - [77, 1, 116, "F19", 77, "F19", 130, "VK_F19", empty, empty], - [0, 1, 117, "F20", 0, empty, 0, "VK_F20", empty, empty], - [0, 1, 118, "F21", 0, empty, 0, "VK_F21", empty, empty], - [0, 1, 119, "F22", 0, empty, 0, "VK_F22", empty, empty], - [0, 1, 120, "F23", 0, empty, 0, "VK_F23", empty, empty], - [0, 1, 121, "F24", 0, empty, 0, "VK_F24", empty, empty], - [0, 1, 122, "Open", 0, empty, 0, empty, empty, empty], - [0, 1, 123, "Help", 0, empty, 0, empty, empty, empty], - [0, 1, 124, "Select", 0, empty, 0, empty, empty, empty], - [0, 1, 125, "Again", 0, empty, 0, empty, empty, empty], - [0, 1, 126, "Undo", 0, empty, 0, empty, empty, empty], - [0, 1, 127, "Cut", 0, empty, 0, empty, empty, empty], - [0, 1, 128, "Copy", 0, empty, 0, empty, empty, empty], - [0, 1, 129, "Paste", 0, empty, 0, empty, empty, empty], - [0, 1, 130, "Find", 0, empty, 0, empty, empty, empty], - [0, 1, 131, "AudioVolumeMute", 112, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", empty, empty], - [0, 1, 132, "AudioVolumeUp", 113, "AudioVolumeUp", 175, "VK_VOLUME_UP", empty, empty], - [0, 1, 133, "AudioVolumeDown", 114, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", empty, empty], - [105, 1, 134, "NumpadComma", 105, "NumPad_Separator", 108, "VK_SEPARATOR", empty, empty], - [110, 0, 135, "IntlRo", 110, "ABNT_C1", 193, "VK_ABNT_C1", empty, empty], - [0, 1, 136, "KanaMode", 0, empty, 0, empty, empty, empty], - [0, 0, 137, "IntlYen", 0, empty, 0, empty, empty, empty], - [0, 1, 138, "Convert", 0, empty, 0, empty, empty, empty], - [0, 1, 139, "NonConvert", 0, empty, 0, empty, empty, empty], - [0, 1, 140, "Lang1", 0, empty, 0, empty, empty, empty], - [0, 1, 141, "Lang2", 0, empty, 0, empty, empty, empty], - [0, 1, 142, "Lang3", 0, empty, 0, empty, empty, empty], - [0, 1, 143, "Lang4", 0, empty, 0, empty, empty, empty], - [0, 1, 144, "Lang5", 0, empty, 0, empty, empty, empty], - [0, 1, 145, "Abort", 0, empty, 0, empty, empty, empty], - [0, 1, 146, "Props", 0, empty, 0, empty, empty, empty], - [0, 1, 147, "NumpadParenLeft", 0, empty, 0, empty, empty, empty], - [0, 1, 148, "NumpadParenRight", 0, empty, 0, empty, empty, empty], - [0, 1, 149, "NumpadBackspace", 0, empty, 0, empty, empty, empty], - [0, 1, 150, "NumpadMemoryStore", 0, empty, 0, empty, empty, empty], - [0, 1, 151, "NumpadMemoryRecall", 0, empty, 0, empty, empty, empty], - [0, 1, 152, "NumpadMemoryClear", 0, empty, 0, empty, empty, empty], - [0, 1, 153, "NumpadMemoryAdd", 0, empty, 0, empty, empty, empty], - [0, 1, 154, "NumpadMemorySubtract", 0, empty, 0, empty, empty, empty], - [0, 1, 155, "NumpadClear", 126, "Clear", 12, "VK_CLEAR", empty, empty], - [0, 1, 156, "NumpadClearEntry", 0, empty, 0, empty, empty, empty], - [5, 1, 0, empty, 5, "Ctrl", 17, "VK_CONTROL", empty, empty], - [4, 1, 0, empty, 4, "Shift", 16, "VK_SHIFT", empty, empty], - [6, 1, 0, empty, 6, "Alt", 18, "VK_MENU", empty, empty], - [57, 1, 0, empty, 57, "Meta", 0, "VK_COMMAND", empty, empty], - [5, 1, 157, "ControlLeft", 5, empty, 0, "VK_LCONTROL", empty, empty], - [4, 1, 158, "ShiftLeft", 4, empty, 0, "VK_LSHIFT", empty, empty], - [6, 1, 159, "AltLeft", 6, empty, 0, "VK_LMENU", empty, empty], - [57, 1, 160, "MetaLeft", 57, empty, 0, "VK_LWIN", empty, empty], - [5, 1, 161, "ControlRight", 5, empty, 0, "VK_RCONTROL", empty, empty], - [4, 1, 162, "ShiftRight", 4, empty, 0, "VK_RSHIFT", empty, empty], - [6, 1, 163, "AltRight", 6, empty, 0, "VK_RMENU", empty, empty], - [57, 1, 164, "MetaRight", 57, empty, 0, "VK_RWIN", empty, empty], - [0, 1, 165, "BrightnessUp", 0, empty, 0, empty, empty, empty], - [0, 1, 166, "BrightnessDown", 0, empty, 0, empty, empty, empty], - [0, 1, 167, "MediaPlay", 0, empty, 0, empty, empty, empty], - [0, 1, 168, "MediaRecord", 0, empty, 0, empty, empty, empty], - [0, 1, 169, "MediaFastForward", 0, empty, 0, empty, empty, empty], - [0, 1, 170, "MediaRewind", 0, empty, 0, empty, empty, empty], - [114, 1, 171, "MediaTrackNext", 119, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", empty, empty], - [115, 1, 172, "MediaTrackPrevious", 120, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", empty, empty], - [116, 1, 173, "MediaStop", 121, "MediaStop", 178, "VK_MEDIA_STOP", empty, empty], - [0, 1, 174, "Eject", 0, empty, 0, empty, empty, empty], - [117, 1, 175, "MediaPlayPause", 122, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", empty, empty], - [0, 1, 176, "MediaSelect", 123, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", empty, empty], - [0, 1, 177, "LaunchMail", 124, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", empty, empty], - [0, 1, 178, "LaunchApp2", 125, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", empty, empty], - [0, 1, 179, "LaunchApp1", 0, empty, 0, "VK_MEDIA_LAUNCH_APP1", empty, empty], - [0, 1, 180, "SelectTask", 0, empty, 0, empty, empty, empty], - [0, 1, 181, "LaunchScreenSaver", 0, empty, 0, empty, empty, empty], - [0, 1, 182, "BrowserSearch", 115, "BrowserSearch", 170, "VK_BROWSER_SEARCH", empty, empty], - [0, 1, 183, "BrowserHome", 116, "BrowserHome", 172, "VK_BROWSER_HOME", empty, empty], - [112, 1, 184, "BrowserBack", 117, "BrowserBack", 166, "VK_BROWSER_BACK", empty, empty], - [113, 1, 185, "BrowserForward", 118, "BrowserForward", 167, "VK_BROWSER_FORWARD", empty, empty], - [0, 1, 186, "BrowserStop", 0, empty, 0, "VK_BROWSER_STOP", empty, empty], - [0, 1, 187, "BrowserRefresh", 0, empty, 0, "VK_BROWSER_REFRESH", empty, empty], - [0, 1, 188, "BrowserFavorites", 0, empty, 0, "VK_BROWSER_FAVORITES", empty, empty], - [0, 1, 189, "ZoomToggle", 0, empty, 0, empty, empty, empty], - [0, 1, 190, "MailReply", 0, empty, 0, empty, empty, empty], - [0, 1, 191, "MailForward", 0, empty, 0, empty, empty, empty], - [0, 1, 192, "MailSend", 0, empty, 0, empty, empty, empty], - [109, 1, 0, empty, 109, "KeyInComposition", 229, empty, empty, empty], - [111, 1, 0, empty, 111, "ABNT_C2", 194, "VK_ABNT_C2", empty, empty], - [91, 1, 0, empty, 91, "OEM_8", 223, "VK_OEM_8", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_KANA", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_HANGUL", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_JUNJA", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_FINAL", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_HANJA", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_KANJI", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_CONVERT", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_NONCONVERT", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_ACCEPT", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_MODECHANGE", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_SELECT", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_PRINT", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_EXECUTE", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_SNAPSHOT", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_HELP", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_APPS", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_PROCESSKEY", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_PACKET", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_DBE_SBCSCHAR", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_DBE_DBCSCHAR", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_ATTN", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_CRSEL", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_EXSEL", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_EREOF", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_PLAY", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_ZOOM", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_NONAME", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_PA1", empty, empty], - [0, 1, 0, empty, 0, empty, 0, "VK_OEM_CLEAR", empty, empty] + [8, 1, 63, "CapsLock", 8, "CapsLock", 20, "VK_CAPITAL", e, e], + [59, 1, 64, "F1", 59, "F1", 112, "VK_F1", e, e], + [60, 1, 65, "F2", 60, "F2", 113, "VK_F2", e, e], + [61, 1, 66, "F3", 61, "F3", 114, "VK_F3", e, e], + [62, 1, 67, "F4", 62, "F4", 115, "VK_F4", e, e], + [63, 1, 68, "F5", 63, "F5", 116, "VK_F5", e, e], + [64, 1, 69, "F6", 64, "F6", 117, "VK_F6", e, e], + [65, 1, 70, "F7", 65, "F7", 118, "VK_F7", e, e], + [66, 1, 71, "F8", 66, "F8", 119, "VK_F8", e, e], + [67, 1, 72, "F9", 67, "F9", 120, "VK_F9", e, e], + [68, 1, 73, "F10", 68, "F10", 121, "VK_F10", e, e], + [69, 1, 74, "F11", 69, "F11", 122, "VK_F11", e, e], + [70, 1, 75, "F12", 70, "F12", 123, "VK_F12", e, e], + [0, 1, 76, "PrintScreen", 0, e, 0, e, e, e], + [79, 1, 77, "ScrollLock", 79, "ScrollLock", 145, "VK_SCROLL", e, e], + [7, 1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", e, e], + [19, 1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", e, e], + [14, 1, 80, "Home", 14, "Home", 36, "VK_HOME", e, e], + [11, 1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", e, e], + [20, 1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", e, e], + [13, 1, 83, "End", 13, "End", 35, "VK_END", e, e], + [12, 1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", e, e], + [17, 1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", e], + [15, 1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", e], + [18, 1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", e], + [16, 1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", e], + [78, 1, 89, "NumLock", 78, "NumLock", 144, "VK_NUMLOCK", e, e], + [108, 1, 90, "NumpadDivide", 108, "NumPad_Divide", 111, "VK_DIVIDE", e, e], + [103, 1, 91, "NumpadMultiply", 103, "NumPad_Multiply", 106, "VK_MULTIPLY", e, e], + [106, 1, 92, "NumpadSubtract", 106, "NumPad_Subtract", 109, "VK_SUBTRACT", e, e], + [104, 1, 93, "NumpadAdd", 104, "NumPad_Add", 107, "VK_ADD", e, e], + [3, 1, 94, "NumpadEnter", 3, e, 0, e, e, e], + [94, 1, 95, "Numpad1", 94, "NumPad1", 97, "VK_NUMPAD1", e, e], + [95, 1, 96, "Numpad2", 95, "NumPad2", 98, "VK_NUMPAD2", e, e], + [96, 1, 97, "Numpad3", 96, "NumPad3", 99, "VK_NUMPAD3", e, e], + [97, 1, 98, "Numpad4", 97, "NumPad4", 100, "VK_NUMPAD4", e, e], + [98, 1, 99, "Numpad5", 98, "NumPad5", 101, "VK_NUMPAD5", e, e], + [99, 1, 100, "Numpad6", 99, "NumPad6", 102, "VK_NUMPAD6", e, e], + [100, 1, 101, "Numpad7", 100, "NumPad7", 103, "VK_NUMPAD7", e, e], + [101, 1, 102, "Numpad8", 101, "NumPad8", 104, "VK_NUMPAD8", e, e], + [102, 1, 103, "Numpad9", 102, "NumPad9", 105, "VK_NUMPAD9", e, e], + [93, 1, 104, "Numpad0", 93, "NumPad0", 96, "VK_NUMPAD0", e, e], + [107, 1, 105, "NumpadDecimal", 107, "NumPad_Decimal", 110, "VK_DECIMAL", e, e], + [92, 0, 106, "IntlBackslash", 92, "OEM_102", 226, "VK_OEM_102", e, e], + [58, 1, 107, "ContextMenu", 58, "ContextMenu", 93, e, e, e], + [0, 1, 108, "Power", 0, e, 0, e, e, e], + [0, 1, 109, "NumpadEqual", 0, e, 0, e, e, e], + [71, 1, 110, "F13", 71, "F13", 124, "VK_F13", e, e], + [72, 1, 111, "F14", 72, "F14", 125, "VK_F14", e, e], + [73, 1, 112, "F15", 73, "F15", 126, "VK_F15", e, e], + [74, 1, 113, "F16", 74, "F16", 127, "VK_F16", e, e], + [75, 1, 114, "F17", 75, "F17", 128, "VK_F17", e, e], + [76, 1, 115, "F18", 76, "F18", 129, "VK_F18", e, e], + [77, 1, 116, "F19", 77, "F19", 130, "VK_F19", e, e], + [0, 1, 117, "F20", 0, e, 0, "VK_F20", e, e], + [0, 1, 118, "F21", 0, e, 0, "VK_F21", e, e], + [0, 1, 119, "F22", 0, e, 0, "VK_F22", e, e], + [0, 1, 120, "F23", 0, e, 0, "VK_F23", e, e], + [0, 1, 121, "F24", 0, e, 0, "VK_F24", e, e], + [0, 1, 122, "Open", 0, e, 0, e, e, e], + [0, 1, 123, "Help", 0, e, 0, e, e, e], + [0, 1, 124, "Select", 0, e, 0, e, e, e], + [0, 1, 125, "Again", 0, e, 0, e, e, e], + [0, 1, 126, "Undo", 0, e, 0, e, e, e], + [0, 1, 127, "Cut", 0, e, 0, e, e, e], + [0, 1, 128, "Copy", 0, e, 0, e, e, e], + [0, 1, 129, "Paste", 0, e, 0, e, e, e], + [0, 1, 130, "Find", 0, e, 0, e, e, e], + [0, 1, 131, "AudioVolumeMute", 112, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", e, e], + [0, 1, 132, "AudioVolumeUp", 113, "AudioVolumeUp", 175, "VK_VOLUME_UP", e, e], + [0, 1, 133, "AudioVolumeDown", 114, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", e, e], + [105, 1, 134, "NumpadComma", 105, "NumPad_Separator", 108, "VK_SEPARATOR", e, e], + [110, 0, 135, "IntlRo", 110, "ABNT_C1", 193, "VK_ABNT_C1", e, e], + [0, 1, 136, "KanaMode", 0, e, 0, e, e, e], + [0, 0, 137, "IntlYen", 0, e, 0, e, e, e], + [0, 1, 138, "Convert", 0, e, 0, e, e, e], + [0, 1, 139, "NonConvert", 0, e, 0, e, e, e], + [0, 1, 140, "Lang1", 0, e, 0, e, e, e], + [0, 1, 141, "Lang2", 0, e, 0, e, e, e], + [0, 1, 142, "Lang3", 0, e, 0, e, e, e], + [0, 1, 143, "Lang4", 0, e, 0, e, e, e], + [0, 1, 144, "Lang5", 0, e, 0, e, e, e], + [0, 1, 145, "Abort", 0, e, 0, e, e, e], + [0, 1, 146, "Props", 0, e, 0, e, e, e], + [0, 1, 147, "NumpadParenLeft", 0, e, 0, e, e, e], + [0, 1, 148, "NumpadParenRight", 0, e, 0, e, e, e], + [0, 1, 149, "NumpadBackspace", 0, e, 0, e, e, e], + [0, 1, 150, "NumpadMemoryStore", 0, e, 0, e, e, e], + [0, 1, 151, "NumpadMemoryRecall", 0, e, 0, e, e, e], + [0, 1, 152, "NumpadMemoryClear", 0, e, 0, e, e, e], + [0, 1, 153, "NumpadMemoryAdd", 0, e, 0, e, e, e], + [0, 1, 154, "NumpadMemorySubtract", 0, e, 0, e, e, e], + [0, 1, 155, "NumpadClear", 126, "Clear", 12, "VK_CLEAR", e, e], + [0, 1, 156, "NumpadClearEntry", 0, e, 0, e, e, e], + [5, 1, 0, e, 5, "Ctrl", 17, "VK_CONTROL", e, e], + [4, 1, 0, e, 4, "Shift", 16, "VK_SHIFT", e, e], + [6, 1, 0, e, 6, "Alt", 18, "VK_MENU", e, e], + [57, 1, 0, e, 57, "Meta", 0, "VK_COMMAND", e, e], + [5, 1, 157, "ControlLeft", 5, e, 0, "VK_LCONTROL", e, e], + [4, 1, 158, "ShiftLeft", 4, e, 0, "VK_LSHIFT", e, e], + [6, 1, 159, "AltLeft", 6, e, 0, "VK_LMENU", e, e], + [57, 1, 160, "MetaLeft", 57, e, 0, "VK_LWIN", e, e], + [5, 1, 161, "ControlRight", 5, e, 0, "VK_RCONTROL", e, e], + [4, 1, 162, "ShiftRight", 4, e, 0, "VK_RSHIFT", e, e], + [6, 1, 163, "AltRight", 6, e, 0, "VK_RMENU", e, e], + [57, 1, 164, "MetaRight", 57, e, 0, "VK_RWIN", e, e], + [0, 1, 165, "BrightnessUp", 0, e, 0, e, e, e], + [0, 1, 166, "BrightnessDown", 0, e, 0, e, e, e], + [0, 1, 167, "MediaPlay", 0, e, 0, e, e, e], + [0, 1, 168, "MediaRecord", 0, e, 0, e, e, e], + [0, 1, 169, "MediaFastForward", 0, e, 0, e, e, e], + [0, 1, 170, "MediaRewind", 0, e, 0, e, e, e], + [114, 1, 171, "MediaTrackNext", 119, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", e, e], + [115, 1, 172, "MediaTrackPrevious", 120, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", e, e], + [116, 1, 173, "MediaStop", 121, "MediaStop", 178, "VK_MEDIA_STOP", e, e], + [0, 1, 174, "Eject", 0, e, 0, e, e, e], + [117, 1, 175, "MediaPlayPause", 122, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", e, e], + [0, 1, 176, "MediaSelect", 123, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", e, e], + [0, 1, 177, "LaunchMail", 124, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", e, e], + [0, 1, 178, "LaunchApp2", 125, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", e, e], + [0, 1, 179, "LaunchApp1", 0, e, 0, "VK_MEDIA_LAUNCH_APP1", e, e], + [0, 1, 180, "SelectTask", 0, e, 0, e, e, e], + [0, 1, 181, "LaunchScreenSaver", 0, e, 0, e, e, e], + [0, 1, 182, "BrowserSearch", 115, "BrowserSearch", 170, "VK_BROWSER_SEARCH", e, e], + [0, 1, 183, "BrowserHome", 116, "BrowserHome", 172, "VK_BROWSER_HOME", e, e], + [112, 1, 184, "BrowserBack", 117, "BrowserBack", 166, "VK_BROWSER_BACK", e, e], + [113, 1, 185, "BrowserForward", 118, "BrowserForward", 167, "VK_BROWSER_FORWARD", e, e], + [0, 1, 186, "BrowserStop", 0, e, 0, "VK_BROWSER_STOP", e, e], + [0, 1, 187, "BrowserRefresh", 0, e, 0, "VK_BROWSER_REFRESH", e, e], + [0, 1, 188, "BrowserFavorites", 0, e, 0, "VK_BROWSER_FAVORITES", e, e], + [0, 1, 189, "ZoomToggle", 0, e, 0, e, e, e], + [0, 1, 190, "MailReply", 0, e, 0, e, e, e], + [0, 1, 191, "MailForward", 0, e, 0, e, e, e], + [0, 1, 192, "MailSend", 0, e, 0, e, e, e], + [109, 1, 0, e, 109, "KeyInComposition", 229, e, e, e], + [111, 1, 0, e, 111, "ABNT_C2", 194, "VK_ABNT_C2", e, e], + [91, 1, 0, e, 91, "OEM_8", 223, "VK_OEM_8", e, e], + [0, 1, 0, e, 0, e, 0, "VK_KANA", e, e], + [0, 1, 0, e, 0, e, 0, "VK_HANGUL", e, e], + [0, 1, 0, e, 0, e, 0, "VK_JUNJA", e, e], + [0, 1, 0, e, 0, e, 0, "VK_FINAL", e, e], + [0, 1, 0, e, 0, e, 0, "VK_HANJA", e, e], + [0, 1, 0, e, 0, e, 0, "VK_KANJI", e, e], + [0, 1, 0, e, 0, e, 0, "VK_CONVERT", e, e], + [0, 1, 0, e, 0, e, 0, "VK_NONCONVERT", e, e], + [0, 1, 0, e, 0, e, 0, "VK_ACCEPT", e, e], + [0, 1, 0, e, 0, e, 0, "VK_MODECHANGE", e, e], + [0, 1, 0, e, 0, e, 0, "VK_SELECT", e, e], + [0, 1, 0, e, 0, e, 0, "VK_PRINT", e, e], + [0, 1, 0, e, 0, e, 0, "VK_EXECUTE", e, e], + [0, 1, 0, e, 0, e, 0, "VK_SNAPSHOT", e, e], + [0, 1, 0, e, 0, e, 0, "VK_HELP", e, e], + [0, 1, 0, e, 0, e, 0, "VK_APPS", e, e], + [0, 1, 0, e, 0, e, 0, "VK_PROCESSKEY", e, e], + [0, 1, 0, e, 0, e, 0, "VK_PACKET", e, e], + [0, 1, 0, e, 0, e, 0, "VK_DBE_SBCSCHAR", e, e], + [0, 1, 0, e, 0, e, 0, "VK_DBE_DBCSCHAR", e, e], + [0, 1, 0, e, 0, e, 0, "VK_ATTN", e, e], + [0, 1, 0, e, 0, e, 0, "VK_CRSEL", e, e], + [0, 1, 0, e, 0, e, 0, "VK_EXSEL", e, e], + [0, 1, 0, e, 0, e, 0, "VK_EREOF", e, e], + [0, 1, 0, e, 0, e, 0, "VK_PLAY", e, e], + [0, 1, 0, e, 0, e, 0, "VK_ZOOM", e, e], + [0, 1, 0, e, 0, e, 0, "VK_NONAME", e, e], + [0, 1, 0, e, 0, e, 0, "VK_PA1", e, e], + [0, 1, 0, e, 0, e, 0, "VK_OEM_CLEAR", e, e] ]; - let seenKeyCode = []; - let seenScanCode = []; - for (const mapping of mappings) { - const [_keyCodeOrd, immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel] = mapping; - if (!seenScanCode[scanCode]) { - seenScanCode[scanCode] = true; - scanCodeStrToInt[scanCodeStr] = scanCode; - scanCodeLowerCaseStrToInt[scanCodeStr.toLowerCase()] = scanCode; - } - if (!seenKeyCode[keyCode]) { - seenKeyCode[keyCode] = true; - if (!keyCodeStr) { - throw new Error(`String representation missing for key code ${keyCode} around scan code ${scanCodeStr}`); - } - uiMap.define(keyCode, keyCodeStr); - userSettingsUSMap.define(keyCode, usUserSettingsLabel || keyCodeStr); - userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel || usUserSettingsLabel || keyCodeStr); - } - if (eventKeyCode) { - EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode; + let n = [], r = []; + for (const i of t) { + const [a, o, l, h, c, d, p, f, g, w] = i; + if (r[l] || (r[l] = !0, Ql[h] = l, ec[h.toLowerCase()] = l), !n[c]) { + if (n[c] = !0, !d) + throw new Error(`String representation missing for key code ${c} around scan code ${h}`); + vn.define(c, d), xr.define(c, g || d), Sr.define(c, w || g || d); } + p && (Zl[p] = c); } })(); -var KeyCodeUtils; -(function(KeyCodeUtils2) { - function toString(keyCode) { - return uiMap.keyCodeToStr(keyCode); +var Mi; +(function(e) { + function t(l) { + return vn.keyCodeToStr(l); } - KeyCodeUtils2.toString = toString; - function fromString(key) { - return uiMap.strToKeyCode(key); + e.toString = t; + function n(l) { + return vn.strToKeyCode(l); } - KeyCodeUtils2.fromString = fromString; - function toUserSettingsUS(keyCode) { - return userSettingsUSMap.keyCodeToStr(keyCode); + e.fromString = n; + function r(l) { + return xr.keyCodeToStr(l); } - KeyCodeUtils2.toUserSettingsUS = toUserSettingsUS; - function toUserSettingsGeneral(keyCode) { - return userSettingsGeneralMap.keyCodeToStr(keyCode); + e.toUserSettingsUS = r; + function i(l) { + return Sr.keyCodeToStr(l); } - KeyCodeUtils2.toUserSettingsGeneral = toUserSettingsGeneral; - function fromUserSettings(key) { - return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key); + e.toUserSettingsGeneral = i; + function a(l) { + return xr.strToKeyCode(l) || Sr.strToKeyCode(l); } - KeyCodeUtils2.fromUserSettings = fromUserSettings; - function toElectronAccelerator(keyCode) { - if (keyCode >= 93 && keyCode <= 108) { + e.fromUserSettings = a; + function o(l) { + if (l >= 93 && l <= 108) return null; - } - switch (keyCode) { + switch (l) { case 16: return "Up"; case 18: @@ -5314,247 +3261,177 @@ var KeyCodeUtils; case 17: return "Right"; } - return uiMap.keyCodeToStr(keyCode); + return vn.keyCodeToStr(l); } - KeyCodeUtils2.toElectronAccelerator = toElectronAccelerator; -})(KeyCodeUtils || (KeyCodeUtils = {})); -function KeyChord(firstPart, secondPart) { - const chordPart = (secondPart & 65535) << 16 >>> 0; - return (firstPart | chordPart) >>> 0; + e.toElectronAccelerator = o; +})(Mi || (Mi = {})); +function tc(e, t) { + const n = (t & 65535) << 16 >>> 0; + return (e | n) >>> 0; } -class Selection extends Range$1 { - constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) { - super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn); - this.selectionStartLineNumber = selectionStartLineNumber; - this.selectionStartColumn = selectionStartColumn; - this.positionLineNumber = positionLineNumber; - this.positionColumn = positionColumn; +class Ce extends te { + constructor(t, n, r, i) { + super(t, n, r, i), this.selectionStartLineNumber = t, this.selectionStartColumn = n, this.positionLineNumber = r, this.positionColumn = i; } toString() { return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"; } - equalsSelection(other) { - return Selection.selectionsEqual(this, other); + equalsSelection(t) { + return Ce.selectionsEqual(this, t); } - static selectionsEqual(a2, b) { - return a2.selectionStartLineNumber === b.selectionStartLineNumber && a2.selectionStartColumn === b.selectionStartColumn && a2.positionLineNumber === b.positionLineNumber && a2.positionColumn === b.positionColumn; + static selectionsEqual(t, n) { + return t.selectionStartLineNumber === n.selectionStartLineNumber && t.selectionStartColumn === n.selectionStartColumn && t.positionLineNumber === n.positionLineNumber && t.positionColumn === n.positionColumn; } getDirection() { - if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) { - return 0; - } - return 1; + return this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn ? 0 : 1; } - setEndPosition(endLineNumber, endColumn) { - if (this.getDirection() === 0) { - return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn); - } - return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn); + setEndPosition(t, n) { + return this.getDirection() === 0 ? new Ce(this.startLineNumber, this.startColumn, t, n) : new Ce(t, n, this.startLineNumber, this.startColumn); } getPosition() { - return new Position$1(this.positionLineNumber, this.positionColumn); + return new we(this.positionLineNumber, this.positionColumn); } getSelectionStart() { - return new Position$1(this.selectionStartLineNumber, this.selectionStartColumn); + return new we(this.selectionStartLineNumber, this.selectionStartColumn); } - setStartPosition(startLineNumber, startColumn) { - if (this.getDirection() === 0) { - return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn); - } - return new Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn); + setStartPosition(t, n) { + return this.getDirection() === 0 ? new Ce(t, n, this.endLineNumber, this.endColumn) : new Ce(this.endLineNumber, this.endColumn, t, n); } - static fromPositions(start, end = start) { - return new Selection(start.lineNumber, start.column, end.lineNumber, end.column); + static fromPositions(t, n = t) { + return new Ce(t.lineNumber, t.column, n.lineNumber, n.column); } - static fromRange(range, direction) { - if (direction === 0) { - return new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - } else { - return new Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn); - } + static fromRange(t, n) { + return n === 0 ? new Ce(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : new Ce(t.endLineNumber, t.endColumn, t.startLineNumber, t.startColumn); } - static liftSelection(sel) { - return new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); + static liftSelection(t) { + return new Ce(t.selectionStartLineNumber, t.selectionStartColumn, t.positionLineNumber, t.positionColumn); } - static selectionsArrEqual(a2, b) { - if (a2 && !b || !a2 && b) { - return false; - } - if (!a2 && !b) { - return true; - } - if (a2.length !== b.length) { - return false; - } - for (let i = 0, len = a2.length; i < len; i++) { - if (!this.selectionsEqual(a2[i], b[i])) { - return false; - } - } - return true; + static selectionsArrEqual(t, n) { + if (t && !n || !t && n) + return !1; + if (!t && !n) + return !0; + if (t.length !== n.length) + return !1; + for (let r = 0, i = t.length; r < i; r++) + if (!this.selectionsEqual(t[r], n[r])) + return !1; + return !0; } - static isISelection(obj) { - return obj && typeof obj.selectionStartLineNumber === "number" && typeof obj.selectionStartColumn === "number" && typeof obj.positionLineNumber === "number" && typeof obj.positionColumn === "number"; + static isISelection(t) { + return t && typeof t.selectionStartLineNumber == "number" && typeof t.selectionStartColumn == "number" && typeof t.positionLineNumber == "number" && typeof t.positionColumn == "number"; } - static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) { - if (direction === 0) { - return new Selection(startLineNumber, startColumn, endLineNumber, endColumn); - } - return new Selection(endLineNumber, endColumn, startLineNumber, startColumn); + static createWithDirection(t, n, r, i, a) { + return a === 0 ? new Ce(t, n, r, i) : new Ce(r, i, t, n); } } -var __awaiter$2 = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); +var Cr = globalThis && globalThis.__awaiter || function(e, t, n, r) { + function i(a) { + return a instanceof n ? a : new n(function(o) { + o(a); }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { + return new (n || (n = Promise))(function(a, o) { + function l(d) { try { - step(generator.next(value)); - } catch (e) { - reject(e); + c(r.next(d)); + } catch (p) { + o(p); } } - function rejected(value) { + function h(d) { try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + c(r.throw(d)); + } catch (p) { + o(p); } } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + function c(d) { + d.done ? a(d.value) : i(d.value).then(l, h); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + c((r = r.apply(e, t || [])).next()); }); }; -class TokenizationRegistry { +class nc { constructor() { - this._map = /* @__PURE__ */ new Map(); - this._factories = /* @__PURE__ */ new Map(); - this._onDidChange = new Emitter(); - this.onDidChange = this._onDidChange.event; - this._colorMap = null; + this._map = /* @__PURE__ */ new Map(), this._factories = /* @__PURE__ */ new Map(), this._onDidChange = new He(), this.onDidChange = this._onDidChange.event, this._colorMap = null; } - fire(languages) { + fire(t) { this._onDidChange.fire({ - changedLanguages: languages, - changedColorMap: false + changedLanguages: t, + changedColorMap: !1 }); } - register(language, support) { - this._map.set(language, support); - this.fire([language]); - return toDisposable(() => { - if (this._map.get(language) !== support) { - return; - } - this._map.delete(language); - this.fire([language]); + register(t, n) { + return this._map.set(t, n), this.fire([t]), wn(() => { + this._map.get(t) === n && (this._map.delete(t), this.fire([t])); }); } - registerFactory(languageId, factory) { - var _a2; - (_a2 = this._factories.get(languageId)) === null || _a2 === void 0 ? void 0 : _a2.dispose(); - const myData = new TokenizationSupportFactoryData(this, languageId, factory); - this._factories.set(languageId, myData); - return toDisposable(() => { - const v = this._factories.get(languageId); - if (!v || v !== myData) { - return; - } - this._factories.delete(languageId); - v.dispose(); + registerFactory(t, n) { + var r; + (r = this._factories.get(t)) === null || r === void 0 || r.dispose(); + const i = new rc(this, t, n); + return this._factories.set(t, i), wn(() => { + const a = this._factories.get(t); + !a || a !== i || (this._factories.delete(t), a.dispose()); }); } - getOrCreate(languageId) { - return __awaiter$2(this, void 0, void 0, function* () { - const tokenizationSupport = this.get(languageId); - if (tokenizationSupport) { - return tokenizationSupport; - } - const factory = this._factories.get(languageId); - if (!factory || factory.isResolved) { - return null; - } - yield factory.resolve(); - return this.get(languageId); + getOrCreate(t) { + return Cr(this, void 0, void 0, function* () { + const n = this.get(t); + if (n) + return n; + const r = this._factories.get(t); + return !r || r.isResolved ? null : (yield r.resolve(), this.get(t)); }); } - get(language) { - return this._map.get(language) || null; + get(t) { + return this._map.get(t) || null; } - isResolved(languageId) { - const tokenizationSupport = this.get(languageId); - if (tokenizationSupport) { - return true; - } - const factory = this._factories.get(languageId); - if (!factory || factory.isResolved) { - return true; - } - return false; + isResolved(t) { + if (this.get(t)) + return !0; + const r = this._factories.get(t); + return !!(!r || r.isResolved); } - setColorMap(colorMap) { - this._colorMap = colorMap; - this._onDidChange.fire({ + setColorMap(t) { + this._colorMap = t, this._onDidChange.fire({ changedLanguages: Array.from(this._map.keys()), - changedColorMap: true + changedColorMap: !0 }); } getColorMap() { return this._colorMap; } getDefaultBackground() { - if (this._colorMap && this._colorMap.length > 2) { - return this._colorMap[2]; - } - return null; + return this._colorMap && this._colorMap.length > 2 ? this._colorMap[2] : null; } } -class TokenizationSupportFactoryData extends Disposable { - constructor(_registry, _languageId, _factory) { - super(); - this._registry = _registry; - this._languageId = _languageId; - this._factory = _factory; - this._isDisposed = false; - this._resolvePromise = null; - this._isResolved = false; +class rc extends Xr { + constructor(t, n, r) { + super(), this._registry = t, this._languageId = n, this._factory = r, this._isDisposed = !1, this._resolvePromise = null, this._isResolved = !1; } get isResolved() { return this._isResolved; } dispose() { - this._isDisposed = true; - super.dispose(); + this._isDisposed = !0, super.dispose(); } resolve() { - return __awaiter$2(this, void 0, void 0, function* () { - if (!this._resolvePromise) { - this._resolvePromise = this._create(); - } - return this._resolvePromise; + return Cr(this, void 0, void 0, function* () { + return this._resolvePromise || (this._resolvePromise = this._create()), this._resolvePromise; }); } _create() { - return __awaiter$2(this, void 0, void 0, function* () { - const value = yield Promise.resolve(this._factory.createTokenizationSupport()); - this._isResolved = true; - if (value && !this._isDisposed) { - this._register(this._registry.register(this._languageId, value)); - } + return Cr(this, void 0, void 0, function* () { + const t = yield Promise.resolve(this._factory.createTokenizationSupport()); + this._isResolved = !0, t && !this._isDisposed && this._register(this._registry.register(this._languageId, t)); }); } } -class Codicon { - constructor(id, definition, description) { - this.id = id; - this.definition = definition; - this.description = description; - Codicon._allCodicons.push(this); +class s { + constructor(t, n, r) { + this.id = t, this.definition = n, this.description = r, s._allCodicons.push(this); } get classNames() { return "codicon codicon-" + this.id; @@ -5566,1590 +3443,981 @@ class Codicon { return ".codicon.codicon-" + this.id; } static getAll() { - return Codicon._allCodicons; + return s._allCodicons; } } -Codicon._allCodicons = []; -Codicon.add = new Codicon("add", { fontCharacter: "\\ea60" }); -Codicon.plus = new Codicon("plus", Codicon.add.definition); -Codicon.gistNew = new Codicon("gist-new", Codicon.add.definition); -Codicon.repoCreate = new Codicon("repo-create", Codicon.add.definition); -Codicon.lightbulb = new Codicon("lightbulb", { fontCharacter: "\\ea61" }); -Codicon.lightBulb = new Codicon("light-bulb", { fontCharacter: "\\ea61" }); -Codicon.repo = new Codicon("repo", { fontCharacter: "\\ea62" }); -Codicon.repoDelete = new Codicon("repo-delete", { fontCharacter: "\\ea62" }); -Codicon.gistFork = new Codicon("gist-fork", { fontCharacter: "\\ea63" }); -Codicon.repoForked = new Codicon("repo-forked", { fontCharacter: "\\ea63" }); -Codicon.gitPullRequest = new Codicon("git-pull-request", { fontCharacter: "\\ea64" }); -Codicon.gitPullRequestAbandoned = new Codicon("git-pull-request-abandoned", { fontCharacter: "\\ea64" }); -Codicon.recordKeys = new Codicon("record-keys", { fontCharacter: "\\ea65" }); -Codicon.keyboard = new Codicon("keyboard", { fontCharacter: "\\ea65" }); -Codicon.tag = new Codicon("tag", { fontCharacter: "\\ea66" }); -Codicon.tagAdd = new Codicon("tag-add", { fontCharacter: "\\ea66" }); -Codicon.tagRemove = new Codicon("tag-remove", { fontCharacter: "\\ea66" }); -Codicon.person = new Codicon("person", { fontCharacter: "\\ea67" }); -Codicon.personFollow = new Codicon("person-follow", { fontCharacter: "\\ea67" }); -Codicon.personOutline = new Codicon("person-outline", { fontCharacter: "\\ea67" }); -Codicon.personFilled = new Codicon("person-filled", { fontCharacter: "\\ea67" }); -Codicon.gitBranch = new Codicon("git-branch", { fontCharacter: "\\ea68" }); -Codicon.gitBranchCreate = new Codicon("git-branch-create", { fontCharacter: "\\ea68" }); -Codicon.gitBranchDelete = new Codicon("git-branch-delete", { fontCharacter: "\\ea68" }); -Codicon.sourceControl = new Codicon("source-control", { fontCharacter: "\\ea68" }); -Codicon.mirror = new Codicon("mirror", { fontCharacter: "\\ea69" }); -Codicon.mirrorPublic = new Codicon("mirror-public", { fontCharacter: "\\ea69" }); -Codicon.star = new Codicon("star", { fontCharacter: "\\ea6a" }); -Codicon.starAdd = new Codicon("star-add", { fontCharacter: "\\ea6a" }); -Codicon.starDelete = new Codicon("star-delete", { fontCharacter: "\\ea6a" }); -Codicon.starEmpty = new Codicon("star-empty", { fontCharacter: "\\ea6a" }); -Codicon.comment = new Codicon("comment", { fontCharacter: "\\ea6b" }); -Codicon.commentAdd = new Codicon("comment-add", { fontCharacter: "\\ea6b" }); -Codicon.alert = new Codicon("alert", { fontCharacter: "\\ea6c" }); -Codicon.warning = new Codicon("warning", { fontCharacter: "\\ea6c" }); -Codicon.search = new Codicon("search", { fontCharacter: "\\ea6d" }); -Codicon.searchSave = new Codicon("search-save", { fontCharacter: "\\ea6d" }); -Codicon.logOut = new Codicon("log-out", { fontCharacter: "\\ea6e" }); -Codicon.signOut = new Codicon("sign-out", { fontCharacter: "\\ea6e" }); -Codicon.logIn = new Codicon("log-in", { fontCharacter: "\\ea6f" }); -Codicon.signIn = new Codicon("sign-in", { fontCharacter: "\\ea6f" }); -Codicon.eye = new Codicon("eye", { fontCharacter: "\\ea70" }); -Codicon.eyeUnwatch = new Codicon("eye-unwatch", { fontCharacter: "\\ea70" }); -Codicon.eyeWatch = new Codicon("eye-watch", { fontCharacter: "\\ea70" }); -Codicon.circleFilled = new Codicon("circle-filled", { fontCharacter: "\\ea71" }); -Codicon.primitiveDot = new Codicon("primitive-dot", { fontCharacter: "\\ea71" }); -Codicon.closeDirty = new Codicon("close-dirty", { fontCharacter: "\\ea71" }); -Codicon.debugBreakpoint = new Codicon("debug-breakpoint", { fontCharacter: "\\ea71" }); -Codicon.debugBreakpointDisabled = new Codicon("debug-breakpoint-disabled", { fontCharacter: "\\ea71" }); -Codicon.debugHint = new Codicon("debug-hint", { fontCharacter: "\\ea71" }); -Codicon.primitiveSquare = new Codicon("primitive-square", { fontCharacter: "\\ea72" }); -Codicon.edit = new Codicon("edit", { fontCharacter: "\\ea73" }); -Codicon.pencil = new Codicon("pencil", { fontCharacter: "\\ea73" }); -Codicon.info = new Codicon("info", { fontCharacter: "\\ea74" }); -Codicon.issueOpened = new Codicon("issue-opened", { fontCharacter: "\\ea74" }); -Codicon.gistPrivate = new Codicon("gist-private", { fontCharacter: "\\ea75" }); -Codicon.gitForkPrivate = new Codicon("git-fork-private", { fontCharacter: "\\ea75" }); -Codicon.lock = new Codicon("lock", { fontCharacter: "\\ea75" }); -Codicon.mirrorPrivate = new Codicon("mirror-private", { fontCharacter: "\\ea75" }); -Codicon.close = new Codicon("close", { fontCharacter: "\\ea76" }); -Codicon.removeClose = new Codicon("remove-close", { fontCharacter: "\\ea76" }); -Codicon.x = new Codicon("x", { fontCharacter: "\\ea76" }); -Codicon.repoSync = new Codicon("repo-sync", { fontCharacter: "\\ea77" }); -Codicon.sync = new Codicon("sync", { fontCharacter: "\\ea77" }); -Codicon.clone = new Codicon("clone", { fontCharacter: "\\ea78" }); -Codicon.desktopDownload = new Codicon("desktop-download", { fontCharacter: "\\ea78" }); -Codicon.beaker = new Codicon("beaker", { fontCharacter: "\\ea79" }); -Codicon.microscope = new Codicon("microscope", { fontCharacter: "\\ea79" }); -Codicon.vm = new Codicon("vm", { fontCharacter: "\\ea7a" }); -Codicon.deviceDesktop = new Codicon("device-desktop", { fontCharacter: "\\ea7a" }); -Codicon.file = new Codicon("file", { fontCharacter: "\\ea7b" }); -Codicon.fileText = new Codicon("file-text", { fontCharacter: "\\ea7b" }); -Codicon.more = new Codicon("more", { fontCharacter: "\\ea7c" }); -Codicon.ellipsis = new Codicon("ellipsis", { fontCharacter: "\\ea7c" }); -Codicon.kebabHorizontal = new Codicon("kebab-horizontal", { fontCharacter: "\\ea7c" }); -Codicon.mailReply = new Codicon("mail-reply", { fontCharacter: "\\ea7d" }); -Codicon.reply = new Codicon("reply", { fontCharacter: "\\ea7d" }); -Codicon.organization = new Codicon("organization", { fontCharacter: "\\ea7e" }); -Codicon.organizationFilled = new Codicon("organization-filled", { fontCharacter: "\\ea7e" }); -Codicon.organizationOutline = new Codicon("organization-outline", { fontCharacter: "\\ea7e" }); -Codicon.newFile = new Codicon("new-file", { fontCharacter: "\\ea7f" }); -Codicon.fileAdd = new Codicon("file-add", { fontCharacter: "\\ea7f" }); -Codicon.newFolder = new Codicon("new-folder", { fontCharacter: "\\ea80" }); -Codicon.fileDirectoryCreate = new Codicon("file-directory-create", { fontCharacter: "\\ea80" }); -Codicon.trash = new Codicon("trash", { fontCharacter: "\\ea81" }); -Codicon.trashcan = new Codicon("trashcan", { fontCharacter: "\\ea81" }); -Codicon.history = new Codicon("history", { fontCharacter: "\\ea82" }); -Codicon.clock = new Codicon("clock", { fontCharacter: "\\ea82" }); -Codicon.folder = new Codicon("folder", { fontCharacter: "\\ea83" }); -Codicon.fileDirectory = new Codicon("file-directory", { fontCharacter: "\\ea83" }); -Codicon.symbolFolder = new Codicon("symbol-folder", { fontCharacter: "\\ea83" }); -Codicon.logoGithub = new Codicon("logo-github", { fontCharacter: "\\ea84" }); -Codicon.markGithub = new Codicon("mark-github", { fontCharacter: "\\ea84" }); -Codicon.github = new Codicon("github", { fontCharacter: "\\ea84" }); -Codicon.terminal = new Codicon("terminal", { fontCharacter: "\\ea85" }); -Codicon.console = new Codicon("console", { fontCharacter: "\\ea85" }); -Codicon.repl = new Codicon("repl", { fontCharacter: "\\ea85" }); -Codicon.zap = new Codicon("zap", { fontCharacter: "\\ea86" }); -Codicon.symbolEvent = new Codicon("symbol-event", { fontCharacter: "\\ea86" }); -Codicon.error = new Codicon("error", { fontCharacter: "\\ea87" }); -Codicon.stop = new Codicon("stop", { fontCharacter: "\\ea87" }); -Codicon.variable = new Codicon("variable", { fontCharacter: "\\ea88" }); -Codicon.symbolVariable = new Codicon("symbol-variable", { fontCharacter: "\\ea88" }); -Codicon.array = new Codicon("array", { fontCharacter: "\\ea8a" }); -Codicon.symbolArray = new Codicon("symbol-array", { fontCharacter: "\\ea8a" }); -Codicon.symbolModule = new Codicon("symbol-module", { fontCharacter: "\\ea8b" }); -Codicon.symbolPackage = new Codicon("symbol-package", { fontCharacter: "\\ea8b" }); -Codicon.symbolNamespace = new Codicon("symbol-namespace", { fontCharacter: "\\ea8b" }); -Codicon.symbolObject = new Codicon("symbol-object", { fontCharacter: "\\ea8b" }); -Codicon.symbolMethod = new Codicon("symbol-method", { fontCharacter: "\\ea8c" }); -Codicon.symbolFunction = new Codicon("symbol-function", { fontCharacter: "\\ea8c" }); -Codicon.symbolConstructor = new Codicon("symbol-constructor", { fontCharacter: "\\ea8c" }); -Codicon.symbolBoolean = new Codicon("symbol-boolean", { fontCharacter: "\\ea8f" }); -Codicon.symbolNull = new Codicon("symbol-null", { fontCharacter: "\\ea8f" }); -Codicon.symbolNumeric = new Codicon("symbol-numeric", { fontCharacter: "\\ea90" }); -Codicon.symbolNumber = new Codicon("symbol-number", { fontCharacter: "\\ea90" }); -Codicon.symbolStructure = new Codicon("symbol-structure", { fontCharacter: "\\ea91" }); -Codicon.symbolStruct = new Codicon("symbol-struct", { fontCharacter: "\\ea91" }); -Codicon.symbolParameter = new Codicon("symbol-parameter", { fontCharacter: "\\ea92" }); -Codicon.symbolTypeParameter = new Codicon("symbol-type-parameter", { fontCharacter: "\\ea92" }); -Codicon.symbolKey = new Codicon("symbol-key", { fontCharacter: "\\ea93" }); -Codicon.symbolText = new Codicon("symbol-text", { fontCharacter: "\\ea93" }); -Codicon.symbolReference = new Codicon("symbol-reference", { fontCharacter: "\\ea94" }); -Codicon.goToFile = new Codicon("go-to-file", { fontCharacter: "\\ea94" }); -Codicon.symbolEnum = new Codicon("symbol-enum", { fontCharacter: "\\ea95" }); -Codicon.symbolValue = new Codicon("symbol-value", { fontCharacter: "\\ea95" }); -Codicon.symbolRuler = new Codicon("symbol-ruler", { fontCharacter: "\\ea96" }); -Codicon.symbolUnit = new Codicon("symbol-unit", { fontCharacter: "\\ea96" }); -Codicon.activateBreakpoints = new Codicon("activate-breakpoints", { fontCharacter: "\\ea97" }); -Codicon.archive = new Codicon("archive", { fontCharacter: "\\ea98" }); -Codicon.arrowBoth = new Codicon("arrow-both", { fontCharacter: "\\ea99" }); -Codicon.arrowDown = new Codicon("arrow-down", { fontCharacter: "\\ea9a" }); -Codicon.arrowLeft = new Codicon("arrow-left", { fontCharacter: "\\ea9b" }); -Codicon.arrowRight = new Codicon("arrow-right", { fontCharacter: "\\ea9c" }); -Codicon.arrowSmallDown = new Codicon("arrow-small-down", { fontCharacter: "\\ea9d" }); -Codicon.arrowSmallLeft = new Codicon("arrow-small-left", { fontCharacter: "\\ea9e" }); -Codicon.arrowSmallRight = new Codicon("arrow-small-right", { fontCharacter: "\\ea9f" }); -Codicon.arrowSmallUp = new Codicon("arrow-small-up", { fontCharacter: "\\eaa0" }); -Codicon.arrowUp = new Codicon("arrow-up", { fontCharacter: "\\eaa1" }); -Codicon.bell = new Codicon("bell", { fontCharacter: "\\eaa2" }); -Codicon.bold = new Codicon("bold", { fontCharacter: "\\eaa3" }); -Codicon.book = new Codicon("book", { fontCharacter: "\\eaa4" }); -Codicon.bookmark = new Codicon("bookmark", { fontCharacter: "\\eaa5" }); -Codicon.debugBreakpointConditionalUnverified = new Codicon("debug-breakpoint-conditional-unverified", { fontCharacter: "\\eaa6" }); -Codicon.debugBreakpointConditional = new Codicon("debug-breakpoint-conditional", { fontCharacter: "\\eaa7" }); -Codicon.debugBreakpointConditionalDisabled = new Codicon("debug-breakpoint-conditional-disabled", { fontCharacter: "\\eaa7" }); -Codicon.debugBreakpointDataUnverified = new Codicon("debug-breakpoint-data-unverified", { fontCharacter: "\\eaa8" }); -Codicon.debugBreakpointData = new Codicon("debug-breakpoint-data", { fontCharacter: "\\eaa9" }); -Codicon.debugBreakpointDataDisabled = new Codicon("debug-breakpoint-data-disabled", { fontCharacter: "\\eaa9" }); -Codicon.debugBreakpointLogUnverified = new Codicon("debug-breakpoint-log-unverified", { fontCharacter: "\\eaaa" }); -Codicon.debugBreakpointLog = new Codicon("debug-breakpoint-log", { fontCharacter: "\\eaab" }); -Codicon.debugBreakpointLogDisabled = new Codicon("debug-breakpoint-log-disabled", { fontCharacter: "\\eaab" }); -Codicon.briefcase = new Codicon("briefcase", { fontCharacter: "\\eaac" }); -Codicon.broadcast = new Codicon("broadcast", { fontCharacter: "\\eaad" }); -Codicon.browser = new Codicon("browser", { fontCharacter: "\\eaae" }); -Codicon.bug = new Codicon("bug", { fontCharacter: "\\eaaf" }); -Codicon.calendar = new Codicon("calendar", { fontCharacter: "\\eab0" }); -Codicon.caseSensitive = new Codicon("case-sensitive", { fontCharacter: "\\eab1" }); -Codicon.check = new Codicon("check", { fontCharacter: "\\eab2" }); -Codicon.checklist = new Codicon("checklist", { fontCharacter: "\\eab3" }); -Codicon.chevronDown = new Codicon("chevron-down", { fontCharacter: "\\eab4" }); -Codicon.dropDownButton = new Codicon("drop-down-button", Codicon.chevronDown.definition); -Codicon.chevronLeft = new Codicon("chevron-left", { fontCharacter: "\\eab5" }); -Codicon.chevronRight = new Codicon("chevron-right", { fontCharacter: "\\eab6" }); -Codicon.chevronUp = new Codicon("chevron-up", { fontCharacter: "\\eab7" }); -Codicon.chromeClose = new Codicon("chrome-close", { fontCharacter: "\\eab8" }); -Codicon.chromeMaximize = new Codicon("chrome-maximize", { fontCharacter: "\\eab9" }); -Codicon.chromeMinimize = new Codicon("chrome-minimize", { fontCharacter: "\\eaba" }); -Codicon.chromeRestore = new Codicon("chrome-restore", { fontCharacter: "\\eabb" }); -Codicon.circleOutline = new Codicon("circle-outline", { fontCharacter: "\\eabc" }); -Codicon.debugBreakpointUnverified = new Codicon("debug-breakpoint-unverified", { fontCharacter: "\\eabc" }); -Codicon.circleSlash = new Codicon("circle-slash", { fontCharacter: "\\eabd" }); -Codicon.circuitBoard = new Codicon("circuit-board", { fontCharacter: "\\eabe" }); -Codicon.clearAll = new Codicon("clear-all", { fontCharacter: "\\eabf" }); -Codicon.clippy = new Codicon("clippy", { fontCharacter: "\\eac0" }); -Codicon.closeAll = new Codicon("close-all", { fontCharacter: "\\eac1" }); -Codicon.cloudDownload = new Codicon("cloud-download", { fontCharacter: "\\eac2" }); -Codicon.cloudUpload = new Codicon("cloud-upload", { fontCharacter: "\\eac3" }); -Codicon.code = new Codicon("code", { fontCharacter: "\\eac4" }); -Codicon.collapseAll = new Codicon("collapse-all", { fontCharacter: "\\eac5" }); -Codicon.colorMode = new Codicon("color-mode", { fontCharacter: "\\eac6" }); -Codicon.commentDiscussion = new Codicon("comment-discussion", { fontCharacter: "\\eac7" }); -Codicon.compareChanges = new Codicon("compare-changes", { fontCharacter: "\\eafd" }); -Codicon.creditCard = new Codicon("credit-card", { fontCharacter: "\\eac9" }); -Codicon.dash = new Codicon("dash", { fontCharacter: "\\eacc" }); -Codicon.dashboard = new Codicon("dashboard", { fontCharacter: "\\eacd" }); -Codicon.database = new Codicon("database", { fontCharacter: "\\eace" }); -Codicon.debugContinue = new Codicon("debug-continue", { fontCharacter: "\\eacf" }); -Codicon.debugDisconnect = new Codicon("debug-disconnect", { fontCharacter: "\\ead0" }); -Codicon.debugPause = new Codicon("debug-pause", { fontCharacter: "\\ead1" }); -Codicon.debugRestart = new Codicon("debug-restart", { fontCharacter: "\\ead2" }); -Codicon.debugStart = new Codicon("debug-start", { fontCharacter: "\\ead3" }); -Codicon.debugStepInto = new Codicon("debug-step-into", { fontCharacter: "\\ead4" }); -Codicon.debugStepOut = new Codicon("debug-step-out", { fontCharacter: "\\ead5" }); -Codicon.debugStepOver = new Codicon("debug-step-over", { fontCharacter: "\\ead6" }); -Codicon.debugStop = new Codicon("debug-stop", { fontCharacter: "\\ead7" }); -Codicon.debug = new Codicon("debug", { fontCharacter: "\\ead8" }); -Codicon.deviceCameraVideo = new Codicon("device-camera-video", { fontCharacter: "\\ead9" }); -Codicon.deviceCamera = new Codicon("device-camera", { fontCharacter: "\\eada" }); -Codicon.deviceMobile = new Codicon("device-mobile", { fontCharacter: "\\eadb" }); -Codicon.diffAdded = new Codicon("diff-added", { fontCharacter: "\\eadc" }); -Codicon.diffIgnored = new Codicon("diff-ignored", { fontCharacter: "\\eadd" }); -Codicon.diffModified = new Codicon("diff-modified", { fontCharacter: "\\eade" }); -Codicon.diffRemoved = new Codicon("diff-removed", { fontCharacter: "\\eadf" }); -Codicon.diffRenamed = new Codicon("diff-renamed", { fontCharacter: "\\eae0" }); -Codicon.diff = new Codicon("diff", { fontCharacter: "\\eae1" }); -Codicon.discard = new Codicon("discard", { fontCharacter: "\\eae2" }); -Codicon.editorLayout = new Codicon("editor-layout", { fontCharacter: "\\eae3" }); -Codicon.emptyWindow = new Codicon("empty-window", { fontCharacter: "\\eae4" }); -Codicon.exclude = new Codicon("exclude", { fontCharacter: "\\eae5" }); -Codicon.extensions = new Codicon("extensions", { fontCharacter: "\\eae6" }); -Codicon.eyeClosed = new Codicon("eye-closed", { fontCharacter: "\\eae7" }); -Codicon.fileBinary = new Codicon("file-binary", { fontCharacter: "\\eae8" }); -Codicon.fileCode = new Codicon("file-code", { fontCharacter: "\\eae9" }); -Codicon.fileMedia = new Codicon("file-media", { fontCharacter: "\\eaea" }); -Codicon.filePdf = new Codicon("file-pdf", { fontCharacter: "\\eaeb" }); -Codicon.fileSubmodule = new Codicon("file-submodule", { fontCharacter: "\\eaec" }); -Codicon.fileSymlinkDirectory = new Codicon("file-symlink-directory", { fontCharacter: "\\eaed" }); -Codicon.fileSymlinkFile = new Codicon("file-symlink-file", { fontCharacter: "\\eaee" }); -Codicon.fileZip = new Codicon("file-zip", { fontCharacter: "\\eaef" }); -Codicon.files = new Codicon("files", { fontCharacter: "\\eaf0" }); -Codicon.filter = new Codicon("filter", { fontCharacter: "\\eaf1" }); -Codicon.flame = new Codicon("flame", { fontCharacter: "\\eaf2" }); -Codicon.foldDown = new Codicon("fold-down", { fontCharacter: "\\eaf3" }); -Codicon.foldUp = new Codicon("fold-up", { fontCharacter: "\\eaf4" }); -Codicon.fold = new Codicon("fold", { fontCharacter: "\\eaf5" }); -Codicon.folderActive = new Codicon("folder-active", { fontCharacter: "\\eaf6" }); -Codicon.folderOpened = new Codicon("folder-opened", { fontCharacter: "\\eaf7" }); -Codicon.gear = new Codicon("gear", { fontCharacter: "\\eaf8" }); -Codicon.gift = new Codicon("gift", { fontCharacter: "\\eaf9" }); -Codicon.gistSecret = new Codicon("gist-secret", { fontCharacter: "\\eafa" }); -Codicon.gist = new Codicon("gist", { fontCharacter: "\\eafb" }); -Codicon.gitCommit = new Codicon("git-commit", { fontCharacter: "\\eafc" }); -Codicon.gitCompare = new Codicon("git-compare", { fontCharacter: "\\eafd" }); -Codicon.gitMerge = new Codicon("git-merge", { fontCharacter: "\\eafe" }); -Codicon.githubAction = new Codicon("github-action", { fontCharacter: "\\eaff" }); -Codicon.githubAlt = new Codicon("github-alt", { fontCharacter: "\\eb00" }); -Codicon.globe = new Codicon("globe", { fontCharacter: "\\eb01" }); -Codicon.grabber = new Codicon("grabber", { fontCharacter: "\\eb02" }); -Codicon.graph = new Codicon("graph", { fontCharacter: "\\eb03" }); -Codicon.gripper = new Codicon("gripper", { fontCharacter: "\\eb04" }); -Codicon.heart = new Codicon("heart", { fontCharacter: "\\eb05" }); -Codicon.home = new Codicon("home", { fontCharacter: "\\eb06" }); -Codicon.horizontalRule = new Codicon("horizontal-rule", { fontCharacter: "\\eb07" }); -Codicon.hubot = new Codicon("hubot", { fontCharacter: "\\eb08" }); -Codicon.inbox = new Codicon("inbox", { fontCharacter: "\\eb09" }); -Codicon.issueClosed = new Codicon("issue-closed", { fontCharacter: "\\eba4" }); -Codicon.issueReopened = new Codicon("issue-reopened", { fontCharacter: "\\eb0b" }); -Codicon.issues = new Codicon("issues", { fontCharacter: "\\eb0c" }); -Codicon.italic = new Codicon("italic", { fontCharacter: "\\eb0d" }); -Codicon.jersey = new Codicon("jersey", { fontCharacter: "\\eb0e" }); -Codicon.json = new Codicon("json", { fontCharacter: "\\eb0f" }); -Codicon.kebabVertical = new Codicon("kebab-vertical", { fontCharacter: "\\eb10" }); -Codicon.key = new Codicon("key", { fontCharacter: "\\eb11" }); -Codicon.law = new Codicon("law", { fontCharacter: "\\eb12" }); -Codicon.lightbulbAutofix = new Codicon("lightbulb-autofix", { fontCharacter: "\\eb13" }); -Codicon.linkExternal = new Codicon("link-external", { fontCharacter: "\\eb14" }); -Codicon.link = new Codicon("link", { fontCharacter: "\\eb15" }); -Codicon.listOrdered = new Codicon("list-ordered", { fontCharacter: "\\eb16" }); -Codicon.listUnordered = new Codicon("list-unordered", { fontCharacter: "\\eb17" }); -Codicon.liveShare = new Codicon("live-share", { fontCharacter: "\\eb18" }); -Codicon.loading = new Codicon("loading", { fontCharacter: "\\eb19" }); -Codicon.location = new Codicon("location", { fontCharacter: "\\eb1a" }); -Codicon.mailRead = new Codicon("mail-read", { fontCharacter: "\\eb1b" }); -Codicon.mail = new Codicon("mail", { fontCharacter: "\\eb1c" }); -Codicon.markdown = new Codicon("markdown", { fontCharacter: "\\eb1d" }); -Codicon.megaphone = new Codicon("megaphone", { fontCharacter: "\\eb1e" }); -Codicon.mention = new Codicon("mention", { fontCharacter: "\\eb1f" }); -Codicon.milestone = new Codicon("milestone", { fontCharacter: "\\eb20" }); -Codicon.mortarBoard = new Codicon("mortar-board", { fontCharacter: "\\eb21" }); -Codicon.move = new Codicon("move", { fontCharacter: "\\eb22" }); -Codicon.multipleWindows = new Codicon("multiple-windows", { fontCharacter: "\\eb23" }); -Codicon.mute = new Codicon("mute", { fontCharacter: "\\eb24" }); -Codicon.noNewline = new Codicon("no-newline", { fontCharacter: "\\eb25" }); -Codicon.note = new Codicon("note", { fontCharacter: "\\eb26" }); -Codicon.octoface = new Codicon("octoface", { fontCharacter: "\\eb27" }); -Codicon.openPreview = new Codicon("open-preview", { fontCharacter: "\\eb28" }); -Codicon.package_ = new Codicon("package", { fontCharacter: "\\eb29" }); -Codicon.paintcan = new Codicon("paintcan", { fontCharacter: "\\eb2a" }); -Codicon.pin = new Codicon("pin", { fontCharacter: "\\eb2b" }); -Codicon.play = new Codicon("play", { fontCharacter: "\\eb2c" }); -Codicon.run = new Codicon("run", { fontCharacter: "\\eb2c" }); -Codicon.plug = new Codicon("plug", { fontCharacter: "\\eb2d" }); -Codicon.preserveCase = new Codicon("preserve-case", { fontCharacter: "\\eb2e" }); -Codicon.preview = new Codicon("preview", { fontCharacter: "\\eb2f" }); -Codicon.project = new Codicon("project", { fontCharacter: "\\eb30" }); -Codicon.pulse = new Codicon("pulse", { fontCharacter: "\\eb31" }); -Codicon.question = new Codicon("question", { fontCharacter: "\\eb32" }); -Codicon.quote = new Codicon("quote", { fontCharacter: "\\eb33" }); -Codicon.radioTower = new Codicon("radio-tower", { fontCharacter: "\\eb34" }); -Codicon.reactions = new Codicon("reactions", { fontCharacter: "\\eb35" }); -Codicon.references = new Codicon("references", { fontCharacter: "\\eb36" }); -Codicon.refresh = new Codicon("refresh", { fontCharacter: "\\eb37" }); -Codicon.regex = new Codicon("regex", { fontCharacter: "\\eb38" }); -Codicon.remoteExplorer = new Codicon("remote-explorer", { fontCharacter: "\\eb39" }); -Codicon.remote = new Codicon("remote", { fontCharacter: "\\eb3a" }); -Codicon.remove = new Codicon("remove", { fontCharacter: "\\eb3b" }); -Codicon.replaceAll = new Codicon("replace-all", { fontCharacter: "\\eb3c" }); -Codicon.replace = new Codicon("replace", { fontCharacter: "\\eb3d" }); -Codicon.repoClone = new Codicon("repo-clone", { fontCharacter: "\\eb3e" }); -Codicon.repoForcePush = new Codicon("repo-force-push", { fontCharacter: "\\eb3f" }); -Codicon.repoPull = new Codicon("repo-pull", { fontCharacter: "\\eb40" }); -Codicon.repoPush = new Codicon("repo-push", { fontCharacter: "\\eb41" }); -Codicon.report = new Codicon("report", { fontCharacter: "\\eb42" }); -Codicon.requestChanges = new Codicon("request-changes", { fontCharacter: "\\eb43" }); -Codicon.rocket = new Codicon("rocket", { fontCharacter: "\\eb44" }); -Codicon.rootFolderOpened = new Codicon("root-folder-opened", { fontCharacter: "\\eb45" }); -Codicon.rootFolder = new Codicon("root-folder", { fontCharacter: "\\eb46" }); -Codicon.rss = new Codicon("rss", { fontCharacter: "\\eb47" }); -Codicon.ruby = new Codicon("ruby", { fontCharacter: "\\eb48" }); -Codicon.saveAll = new Codicon("save-all", { fontCharacter: "\\eb49" }); -Codicon.saveAs = new Codicon("save-as", { fontCharacter: "\\eb4a" }); -Codicon.save = new Codicon("save", { fontCharacter: "\\eb4b" }); -Codicon.screenFull = new Codicon("screen-full", { fontCharacter: "\\eb4c" }); -Codicon.screenNormal = new Codicon("screen-normal", { fontCharacter: "\\eb4d" }); -Codicon.searchStop = new Codicon("search-stop", { fontCharacter: "\\eb4e" }); -Codicon.server = new Codicon("server", { fontCharacter: "\\eb50" }); -Codicon.settingsGear = new Codicon("settings-gear", { fontCharacter: "\\eb51" }); -Codicon.settings = new Codicon("settings", { fontCharacter: "\\eb52" }); -Codicon.shield = new Codicon("shield", { fontCharacter: "\\eb53" }); -Codicon.smiley = new Codicon("smiley", { fontCharacter: "\\eb54" }); -Codicon.sortPrecedence = new Codicon("sort-precedence", { fontCharacter: "\\eb55" }); -Codicon.splitHorizontal = new Codicon("split-horizontal", { fontCharacter: "\\eb56" }); -Codicon.splitVertical = new Codicon("split-vertical", { fontCharacter: "\\eb57" }); -Codicon.squirrel = new Codicon("squirrel", { fontCharacter: "\\eb58" }); -Codicon.starFull = new Codicon("star-full", { fontCharacter: "\\eb59" }); -Codicon.starHalf = new Codicon("star-half", { fontCharacter: "\\eb5a" }); -Codicon.symbolClass = new Codicon("symbol-class", { fontCharacter: "\\eb5b" }); -Codicon.symbolColor = new Codicon("symbol-color", { fontCharacter: "\\eb5c" }); -Codicon.symbolCustomColor = new Codicon("symbol-customcolor", { fontCharacter: "\\eb5c" }); -Codicon.symbolConstant = new Codicon("symbol-constant", { fontCharacter: "\\eb5d" }); -Codicon.symbolEnumMember = new Codicon("symbol-enum-member", { fontCharacter: "\\eb5e" }); -Codicon.symbolField = new Codicon("symbol-field", { fontCharacter: "\\eb5f" }); -Codicon.symbolFile = new Codicon("symbol-file", { fontCharacter: "\\eb60" }); -Codicon.symbolInterface = new Codicon("symbol-interface", { fontCharacter: "\\eb61" }); -Codicon.symbolKeyword = new Codicon("symbol-keyword", { fontCharacter: "\\eb62" }); -Codicon.symbolMisc = new Codicon("symbol-misc", { fontCharacter: "\\eb63" }); -Codicon.symbolOperator = new Codicon("symbol-operator", { fontCharacter: "\\eb64" }); -Codicon.symbolProperty = new Codicon("symbol-property", { fontCharacter: "\\eb65" }); -Codicon.wrench = new Codicon("wrench", { fontCharacter: "\\eb65" }); -Codicon.wrenchSubaction = new Codicon("wrench-subaction", { fontCharacter: "\\eb65" }); -Codicon.symbolSnippet = new Codicon("symbol-snippet", { fontCharacter: "\\eb66" }); -Codicon.tasklist = new Codicon("tasklist", { fontCharacter: "\\eb67" }); -Codicon.telescope = new Codicon("telescope", { fontCharacter: "\\eb68" }); -Codicon.textSize = new Codicon("text-size", { fontCharacter: "\\eb69" }); -Codicon.threeBars = new Codicon("three-bars", { fontCharacter: "\\eb6a" }); -Codicon.thumbsdown = new Codicon("thumbsdown", { fontCharacter: "\\eb6b" }); -Codicon.thumbsup = new Codicon("thumbsup", { fontCharacter: "\\eb6c" }); -Codicon.tools = new Codicon("tools", { fontCharacter: "\\eb6d" }); -Codicon.triangleDown = new Codicon("triangle-down", { fontCharacter: "\\eb6e" }); -Codicon.triangleLeft = new Codicon("triangle-left", { fontCharacter: "\\eb6f" }); -Codicon.triangleRight = new Codicon("triangle-right", { fontCharacter: "\\eb70" }); -Codicon.triangleUp = new Codicon("triangle-up", { fontCharacter: "\\eb71" }); -Codicon.twitter = new Codicon("twitter", { fontCharacter: "\\eb72" }); -Codicon.unfold = new Codicon("unfold", { fontCharacter: "\\eb73" }); -Codicon.unlock = new Codicon("unlock", { fontCharacter: "\\eb74" }); -Codicon.unmute = new Codicon("unmute", { fontCharacter: "\\eb75" }); -Codicon.unverified = new Codicon("unverified", { fontCharacter: "\\eb76" }); -Codicon.verified = new Codicon("verified", { fontCharacter: "\\eb77" }); -Codicon.versions = new Codicon("versions", { fontCharacter: "\\eb78" }); -Codicon.vmActive = new Codicon("vm-active", { fontCharacter: "\\eb79" }); -Codicon.vmOutline = new Codicon("vm-outline", { fontCharacter: "\\eb7a" }); -Codicon.vmRunning = new Codicon("vm-running", { fontCharacter: "\\eb7b" }); -Codicon.watch = new Codicon("watch", { fontCharacter: "\\eb7c" }); -Codicon.whitespace = new Codicon("whitespace", { fontCharacter: "\\eb7d" }); -Codicon.wholeWord = new Codicon("whole-word", { fontCharacter: "\\eb7e" }); -Codicon.window = new Codicon("window", { fontCharacter: "\\eb7f" }); -Codicon.wordWrap = new Codicon("word-wrap", { fontCharacter: "\\eb80" }); -Codicon.zoomIn = new Codicon("zoom-in", { fontCharacter: "\\eb81" }); -Codicon.zoomOut = new Codicon("zoom-out", { fontCharacter: "\\eb82" }); -Codicon.listFilter = new Codicon("list-filter", { fontCharacter: "\\eb83" }); -Codicon.listFlat = new Codicon("list-flat", { fontCharacter: "\\eb84" }); -Codicon.listSelection = new Codicon("list-selection", { fontCharacter: "\\eb85" }); -Codicon.selection = new Codicon("selection", { fontCharacter: "\\eb85" }); -Codicon.listTree = new Codicon("list-tree", { fontCharacter: "\\eb86" }); -Codicon.debugBreakpointFunctionUnverified = new Codicon("debug-breakpoint-function-unverified", { fontCharacter: "\\eb87" }); -Codicon.debugBreakpointFunction = new Codicon("debug-breakpoint-function", { fontCharacter: "\\eb88" }); -Codicon.debugBreakpointFunctionDisabled = new Codicon("debug-breakpoint-function-disabled", { fontCharacter: "\\eb88" }); -Codicon.debugStackframeActive = new Codicon("debug-stackframe-active", { fontCharacter: "\\eb89" }); -Codicon.debugStackframeDot = new Codicon("debug-stackframe-dot", { fontCharacter: "\\eb8a" }); -Codicon.debugStackframe = new Codicon("debug-stackframe", { fontCharacter: "\\eb8b" }); -Codicon.debugStackframeFocused = new Codicon("debug-stackframe-focused", { fontCharacter: "\\eb8b" }); -Codicon.debugBreakpointUnsupported = new Codicon("debug-breakpoint-unsupported", { fontCharacter: "\\eb8c" }); -Codicon.symbolString = new Codicon("symbol-string", { fontCharacter: "\\eb8d" }); -Codicon.debugReverseContinue = new Codicon("debug-reverse-continue", { fontCharacter: "\\eb8e" }); -Codicon.debugStepBack = new Codicon("debug-step-back", { fontCharacter: "\\eb8f" }); -Codicon.debugRestartFrame = new Codicon("debug-restart-frame", { fontCharacter: "\\eb90" }); -Codicon.callIncoming = new Codicon("call-incoming", { fontCharacter: "\\eb92" }); -Codicon.callOutgoing = new Codicon("call-outgoing", { fontCharacter: "\\eb93" }); -Codicon.menu = new Codicon("menu", { fontCharacter: "\\eb94" }); -Codicon.expandAll = new Codicon("expand-all", { fontCharacter: "\\eb95" }); -Codicon.feedback = new Codicon("feedback", { fontCharacter: "\\eb96" }); -Codicon.groupByRefType = new Codicon("group-by-ref-type", { fontCharacter: "\\eb97" }); -Codicon.ungroupByRefType = new Codicon("ungroup-by-ref-type", { fontCharacter: "\\eb98" }); -Codicon.account = new Codicon("account", { fontCharacter: "\\eb99" }); -Codicon.bellDot = new Codicon("bell-dot", { fontCharacter: "\\eb9a" }); -Codicon.debugConsole = new Codicon("debug-console", { fontCharacter: "\\eb9b" }); -Codicon.library = new Codicon("library", { fontCharacter: "\\eb9c" }); -Codicon.output = new Codicon("output", { fontCharacter: "\\eb9d" }); -Codicon.runAll = new Codicon("run-all", { fontCharacter: "\\eb9e" }); -Codicon.syncIgnored = new Codicon("sync-ignored", { fontCharacter: "\\eb9f" }); -Codicon.pinned = new Codicon("pinned", { fontCharacter: "\\eba0" }); -Codicon.githubInverted = new Codicon("github-inverted", { fontCharacter: "\\eba1" }); -Codicon.debugAlt = new Codicon("debug-alt", { fontCharacter: "\\eb91" }); -Codicon.serverProcess = new Codicon("server-process", { fontCharacter: "\\eba2" }); -Codicon.serverEnvironment = new Codicon("server-environment", { fontCharacter: "\\eba3" }); -Codicon.pass = new Codicon("pass", { fontCharacter: "\\eba4" }); -Codicon.stopCircle = new Codicon("stop-circle", { fontCharacter: "\\eba5" }); -Codicon.playCircle = new Codicon("play-circle", { fontCharacter: "\\eba6" }); -Codicon.record = new Codicon("record", { fontCharacter: "\\eba7" }); -Codicon.debugAltSmall = new Codicon("debug-alt-small", { fontCharacter: "\\eba8" }); -Codicon.vmConnect = new Codicon("vm-connect", { fontCharacter: "\\eba9" }); -Codicon.cloud = new Codicon("cloud", { fontCharacter: "\\ebaa" }); -Codicon.merge = new Codicon("merge", { fontCharacter: "\\ebab" }); -Codicon.exportIcon = new Codicon("export", { fontCharacter: "\\ebac" }); -Codicon.graphLeft = new Codicon("graph-left", { fontCharacter: "\\ebad" }); -Codicon.magnet = new Codicon("magnet", { fontCharacter: "\\ebae" }); -Codicon.notebook = new Codicon("notebook", { fontCharacter: "\\ebaf" }); -Codicon.redo = new Codicon("redo", { fontCharacter: "\\ebb0" }); -Codicon.checkAll = new Codicon("check-all", { fontCharacter: "\\ebb1" }); -Codicon.pinnedDirty = new Codicon("pinned-dirty", { fontCharacter: "\\ebb2" }); -Codicon.passFilled = new Codicon("pass-filled", { fontCharacter: "\\ebb3" }); -Codicon.circleLargeFilled = new Codicon("circle-large-filled", { fontCharacter: "\\ebb4" }); -Codicon.circleLargeOutline = new Codicon("circle-large-outline", { fontCharacter: "\\ebb5" }); -Codicon.combine = new Codicon("combine", { fontCharacter: "\\ebb6" }); -Codicon.gather = new Codicon("gather", { fontCharacter: "\\ebb6" }); -Codicon.table = new Codicon("table", { fontCharacter: "\\ebb7" }); -Codicon.variableGroup = new Codicon("variable-group", { fontCharacter: "\\ebb8" }); -Codicon.typeHierarchy = new Codicon("type-hierarchy", { fontCharacter: "\\ebb9" }); -Codicon.typeHierarchySub = new Codicon("type-hierarchy-sub", { fontCharacter: "\\ebba" }); -Codicon.typeHierarchySuper = new Codicon("type-hierarchy-super", { fontCharacter: "\\ebbb" }); -Codicon.gitPullRequestCreate = new Codicon("git-pull-request-create", { fontCharacter: "\\ebbc" }); -Codicon.runAbove = new Codicon("run-above", { fontCharacter: "\\ebbd" }); -Codicon.runBelow = new Codicon("run-below", { fontCharacter: "\\ebbe" }); -Codicon.notebookTemplate = new Codicon("notebook-template", { fontCharacter: "\\ebbf" }); -Codicon.debugRerun = new Codicon("debug-rerun", { fontCharacter: "\\ebc0" }); -Codicon.workspaceTrusted = new Codicon("workspace-trusted", { fontCharacter: "\\ebc1" }); -Codicon.workspaceUntrusted = new Codicon("workspace-untrusted", { fontCharacter: "\\ebc2" }); -Codicon.workspaceUnspecified = new Codicon("workspace-unspecified", { fontCharacter: "\\ebc3" }); -Codicon.terminalCmd = new Codicon("terminal-cmd", { fontCharacter: "\\ebc4" }); -Codicon.terminalDebian = new Codicon("terminal-debian", { fontCharacter: "\\ebc5" }); -Codicon.terminalLinux = new Codicon("terminal-linux", { fontCharacter: "\\ebc6" }); -Codicon.terminalPowershell = new Codicon("terminal-powershell", { fontCharacter: "\\ebc7" }); -Codicon.terminalTmux = new Codicon("terminal-tmux", { fontCharacter: "\\ebc8" }); -Codicon.terminalUbuntu = new Codicon("terminal-ubuntu", { fontCharacter: "\\ebc9" }); -Codicon.terminalBash = new Codicon("terminal-bash", { fontCharacter: "\\ebca" }); -Codicon.arrowSwap = new Codicon("arrow-swap", { fontCharacter: "\\ebcb" }); -Codicon.copy = new Codicon("copy", { fontCharacter: "\\ebcc" }); -Codicon.personAdd = new Codicon("person-add", { fontCharacter: "\\ebcd" }); -Codicon.filterFilled = new Codicon("filter-filled", { fontCharacter: "\\ebce" }); -Codicon.wand = new Codicon("wand", { fontCharacter: "\\ebcf" }); -Codicon.debugLineByLine = new Codicon("debug-line-by-line", { fontCharacter: "\\ebd0" }); -Codicon.inspect = new Codicon("inspect", { fontCharacter: "\\ebd1" }); -Codicon.layers = new Codicon("layers", { fontCharacter: "\\ebd2" }); -Codicon.layersDot = new Codicon("layers-dot", { fontCharacter: "\\ebd3" }); -Codicon.layersActive = new Codicon("layers-active", { fontCharacter: "\\ebd4" }); -Codicon.compass = new Codicon("compass", { fontCharacter: "\\ebd5" }); -Codicon.compassDot = new Codicon("compass-dot", { fontCharacter: "\\ebd6" }); -Codicon.compassActive = new Codicon("compass-active", { fontCharacter: "\\ebd7" }); -Codicon.azure = new Codicon("azure", { fontCharacter: "\\ebd8" }); -Codicon.issueDraft = new Codicon("issue-draft", { fontCharacter: "\\ebd9" }); -Codicon.gitPullRequestClosed = new Codicon("git-pull-request-closed", { fontCharacter: "\\ebda" }); -Codicon.gitPullRequestDraft = new Codicon("git-pull-request-draft", { fontCharacter: "\\ebdb" }); -Codicon.debugAll = new Codicon("debug-all", { fontCharacter: "\\ebdc" }); -Codicon.debugCoverage = new Codicon("debug-coverage", { fontCharacter: "\\ebdd" }); -Codicon.runErrors = new Codicon("run-errors", { fontCharacter: "\\ebde" }); -Codicon.folderLibrary = new Codicon("folder-library", { fontCharacter: "\\ebdf" }); -Codicon.debugContinueSmall = new Codicon("debug-continue-small", { fontCharacter: "\\ebe0" }); -Codicon.beakerStop = new Codicon("beaker-stop", { fontCharacter: "\\ebe1" }); -Codicon.graphLine = new Codicon("graph-line", { fontCharacter: "\\ebe2" }); -Codicon.graphScatter = new Codicon("graph-scatter", { fontCharacter: "\\ebe3" }); -Codicon.pieChart = new Codicon("pie-chart", { fontCharacter: "\\ebe4" }); -Codicon.bracket = new Codicon("bracket", Codicon.json.definition); -Codicon.bracketDot = new Codicon("bracket-dot", { fontCharacter: "\\ebe5" }); -Codicon.bracketError = new Codicon("bracket-error", { fontCharacter: "\\ebe6" }); -Codicon.lockSmall = new Codicon("lock-small", { fontCharacter: "\\ebe7" }); -Codicon.azureDevops = new Codicon("azure-devops", { fontCharacter: "\\ebe8" }); -Codicon.verifiedFilled = new Codicon("verified-filled", { fontCharacter: "\\ebe9" }); -Codicon.newLine = new Codicon("newline", { fontCharacter: "\\ebea" }); -Codicon.layout = new Codicon("layout", { fontCharacter: "\\ebeb" }); -Codicon.layoutActivitybarLeft = new Codicon("layout-activitybar-left", { fontCharacter: "\\ebec" }); -Codicon.layoutActivitybarRight = new Codicon("layout-activitybar-right", { fontCharacter: "\\ebed" }); -Codicon.layoutPanelLeft = new Codicon("layout-panel-left", { fontCharacter: "\\ebee" }); -Codicon.layoutPanelCenter = new Codicon("layout-panel-center", { fontCharacter: "\\ebef" }); -Codicon.layoutPanelJustify = new Codicon("layout-panel-justify", { fontCharacter: "\\ebf0" }); -Codicon.layoutPanelRight = new Codicon("layout-panel-right", { fontCharacter: "\\ebf1" }); -Codicon.layoutPanel = new Codicon("layout-panel", { fontCharacter: "\\ebf2" }); -Codicon.layoutSidebarLeft = new Codicon("layout-sidebar-left", { fontCharacter: "\\ebf3" }); -Codicon.layoutSidebarRight = new Codicon("layout-sidebar-right", { fontCharacter: "\\ebf4" }); -Codicon.layoutStatusbar = new Codicon("layout-statusbar", { fontCharacter: "\\ebf5" }); -Codicon.layoutMenubar = new Codicon("layout-menubar", { fontCharacter: "\\ebf6" }); -Codicon.layoutCentered = new Codicon("layout-centered", { fontCharacter: "\\ebf7" }); -Codicon.target = new Codicon("target", { fontCharacter: "\\ebf8" }); -Codicon.indent = new Codicon("indent", { fontCharacter: "\\ebf9" }); -Codicon.recordSmall = new Codicon("record-small", { fontCharacter: "\\ebfa" }); -Codicon.errorSmall = new Codicon("error-small", { fontCharacter: "\\ebfb" }); -Codicon.arrowCircleDown = new Codicon("arrow-circle-down", { fontCharacter: "\\ebfc" }); -Codicon.arrowCircleLeft = new Codicon("arrow-circle-left", { fontCharacter: "\\ebfd" }); -Codicon.arrowCircleRight = new Codicon("arrow-circle-right", { fontCharacter: "\\ebfe" }); -Codicon.arrowCircleUp = new Codicon("arrow-circle-up", { fontCharacter: "\\ebff" }); -Codicon.dialogError = new Codicon("dialog-error", Codicon.error.definition); -Codicon.dialogWarning = new Codicon("dialog-warning", Codicon.warning.definition); -Codicon.dialogInfo = new Codicon("dialog-info", Codicon.info.definition); -Codicon.dialogClose = new Codicon("dialog-close", Codicon.close.definition); -Codicon.treeItemExpanded = new Codicon("tree-item-expanded", Codicon.chevronDown.definition); -Codicon.treeFilterOnTypeOn = new Codicon("tree-filter-on-type-on", Codicon.listFilter.definition); -Codicon.treeFilterOnTypeOff = new Codicon("tree-filter-on-type-off", Codicon.listSelection.definition); -Codicon.treeFilterClear = new Codicon("tree-filter-clear", Codicon.close.definition); -Codicon.treeItemLoading = new Codicon("tree-item-loading", Codicon.loading.definition); -Codicon.menuSelection = new Codicon("menu-selection", Codicon.check.definition); -Codicon.menuSubmenu = new Codicon("menu-submenu", Codicon.chevronRight.definition); -Codicon.menuBarMore = new Codicon("menubar-more", Codicon.more.definition); -Codicon.scrollbarButtonLeft = new Codicon("scrollbar-button-left", Codicon.triangleLeft.definition); -Codicon.scrollbarButtonRight = new Codicon("scrollbar-button-right", Codicon.triangleRight.definition); -Codicon.scrollbarButtonUp = new Codicon("scrollbar-button-up", Codicon.triangleUp.definition); -Codicon.scrollbarButtonDown = new Codicon("scrollbar-button-down", Codicon.triangleDown.definition); -Codicon.toolBarMore = new Codicon("toolbar-more", Codicon.more.definition); -Codicon.quickInputBack = new Codicon("quick-input-back", Codicon.arrowLeft.definition); -var CSSIcon; -(function(CSSIcon2) { - CSSIcon2.iconNameSegment = "[A-Za-z0-9]+"; - CSSIcon2.iconNameExpression = "[A-Za-z0-9-]+"; - CSSIcon2.iconModifierExpression = "~[A-Za-z]+"; - CSSIcon2.iconNameCharacter = "[A-Za-z0-9~-]"; - const cssIconIdRegex = new RegExp(`^(${CSSIcon2.iconNameExpression})(${CSSIcon2.iconModifierExpression})?$`); - function asClassNameArray(icon) { - if (icon instanceof Codicon) { - return ["codicon", "codicon-" + icon.id]; - } - const match = cssIconIdRegex.exec(icon.id); - if (!match) { - return asClassNameArray(Codicon.error); - } - let [, id, modifier] = match; - const classNames = ["codicon", "codicon-" + id]; - if (modifier) { - classNames.push("codicon-modifier-" + modifier.substr(1)); - } - return classNames; +s._allCodicons = []; +s.add = new s("add", { fontCharacter: "\\ea60" }); +s.plus = new s("plus", s.add.definition); +s.gistNew = new s("gist-new", s.add.definition); +s.repoCreate = new s("repo-create", s.add.definition); +s.lightbulb = new s("lightbulb", { fontCharacter: "\\ea61" }); +s.lightBulb = new s("light-bulb", { fontCharacter: "\\ea61" }); +s.repo = new s("repo", { fontCharacter: "\\ea62" }); +s.repoDelete = new s("repo-delete", { fontCharacter: "\\ea62" }); +s.gistFork = new s("gist-fork", { fontCharacter: "\\ea63" }); +s.repoForked = new s("repo-forked", { fontCharacter: "\\ea63" }); +s.gitPullRequest = new s("git-pull-request", { fontCharacter: "\\ea64" }); +s.gitPullRequestAbandoned = new s("git-pull-request-abandoned", { fontCharacter: "\\ea64" }); +s.recordKeys = new s("record-keys", { fontCharacter: "\\ea65" }); +s.keyboard = new s("keyboard", { fontCharacter: "\\ea65" }); +s.tag = new s("tag", { fontCharacter: "\\ea66" }); +s.tagAdd = new s("tag-add", { fontCharacter: "\\ea66" }); +s.tagRemove = new s("tag-remove", { fontCharacter: "\\ea66" }); +s.person = new s("person", { fontCharacter: "\\ea67" }); +s.personFollow = new s("person-follow", { fontCharacter: "\\ea67" }); +s.personOutline = new s("person-outline", { fontCharacter: "\\ea67" }); +s.personFilled = new s("person-filled", { fontCharacter: "\\ea67" }); +s.gitBranch = new s("git-branch", { fontCharacter: "\\ea68" }); +s.gitBranchCreate = new s("git-branch-create", { fontCharacter: "\\ea68" }); +s.gitBranchDelete = new s("git-branch-delete", { fontCharacter: "\\ea68" }); +s.sourceControl = new s("source-control", { fontCharacter: "\\ea68" }); +s.mirror = new s("mirror", { fontCharacter: "\\ea69" }); +s.mirrorPublic = new s("mirror-public", { fontCharacter: "\\ea69" }); +s.star = new s("star", { fontCharacter: "\\ea6a" }); +s.starAdd = new s("star-add", { fontCharacter: "\\ea6a" }); +s.starDelete = new s("star-delete", { fontCharacter: "\\ea6a" }); +s.starEmpty = new s("star-empty", { fontCharacter: "\\ea6a" }); +s.comment = new s("comment", { fontCharacter: "\\ea6b" }); +s.commentAdd = new s("comment-add", { fontCharacter: "\\ea6b" }); +s.alert = new s("alert", { fontCharacter: "\\ea6c" }); +s.warning = new s("warning", { fontCharacter: "\\ea6c" }); +s.search = new s("search", { fontCharacter: "\\ea6d" }); +s.searchSave = new s("search-save", { fontCharacter: "\\ea6d" }); +s.logOut = new s("log-out", { fontCharacter: "\\ea6e" }); +s.signOut = new s("sign-out", { fontCharacter: "\\ea6e" }); +s.logIn = new s("log-in", { fontCharacter: "\\ea6f" }); +s.signIn = new s("sign-in", { fontCharacter: "\\ea6f" }); +s.eye = new s("eye", { fontCharacter: "\\ea70" }); +s.eyeUnwatch = new s("eye-unwatch", { fontCharacter: "\\ea70" }); +s.eyeWatch = new s("eye-watch", { fontCharacter: "\\ea70" }); +s.circleFilled = new s("circle-filled", { fontCharacter: "\\ea71" }); +s.primitiveDot = new s("primitive-dot", { fontCharacter: "\\ea71" }); +s.closeDirty = new s("close-dirty", { fontCharacter: "\\ea71" }); +s.debugBreakpoint = new s("debug-breakpoint", { fontCharacter: "\\ea71" }); +s.debugBreakpointDisabled = new s("debug-breakpoint-disabled", { fontCharacter: "\\ea71" }); +s.debugHint = new s("debug-hint", { fontCharacter: "\\ea71" }); +s.primitiveSquare = new s("primitive-square", { fontCharacter: "\\ea72" }); +s.edit = new s("edit", { fontCharacter: "\\ea73" }); +s.pencil = new s("pencil", { fontCharacter: "\\ea73" }); +s.info = new s("info", { fontCharacter: "\\ea74" }); +s.issueOpened = new s("issue-opened", { fontCharacter: "\\ea74" }); +s.gistPrivate = new s("gist-private", { fontCharacter: "\\ea75" }); +s.gitForkPrivate = new s("git-fork-private", { fontCharacter: "\\ea75" }); +s.lock = new s("lock", { fontCharacter: "\\ea75" }); +s.mirrorPrivate = new s("mirror-private", { fontCharacter: "\\ea75" }); +s.close = new s("close", { fontCharacter: "\\ea76" }); +s.removeClose = new s("remove-close", { fontCharacter: "\\ea76" }); +s.x = new s("x", { fontCharacter: "\\ea76" }); +s.repoSync = new s("repo-sync", { fontCharacter: "\\ea77" }); +s.sync = new s("sync", { fontCharacter: "\\ea77" }); +s.clone = new s("clone", { fontCharacter: "\\ea78" }); +s.desktopDownload = new s("desktop-download", { fontCharacter: "\\ea78" }); +s.beaker = new s("beaker", { fontCharacter: "\\ea79" }); +s.microscope = new s("microscope", { fontCharacter: "\\ea79" }); +s.vm = new s("vm", { fontCharacter: "\\ea7a" }); +s.deviceDesktop = new s("device-desktop", { fontCharacter: "\\ea7a" }); +s.file = new s("file", { fontCharacter: "\\ea7b" }); +s.fileText = new s("file-text", { fontCharacter: "\\ea7b" }); +s.more = new s("more", { fontCharacter: "\\ea7c" }); +s.ellipsis = new s("ellipsis", { fontCharacter: "\\ea7c" }); +s.kebabHorizontal = new s("kebab-horizontal", { fontCharacter: "\\ea7c" }); +s.mailReply = new s("mail-reply", { fontCharacter: "\\ea7d" }); +s.reply = new s("reply", { fontCharacter: "\\ea7d" }); +s.organization = new s("organization", { fontCharacter: "\\ea7e" }); +s.organizationFilled = new s("organization-filled", { fontCharacter: "\\ea7e" }); +s.organizationOutline = new s("organization-outline", { fontCharacter: "\\ea7e" }); +s.newFile = new s("new-file", { fontCharacter: "\\ea7f" }); +s.fileAdd = new s("file-add", { fontCharacter: "\\ea7f" }); +s.newFolder = new s("new-folder", { fontCharacter: "\\ea80" }); +s.fileDirectoryCreate = new s("file-directory-create", { fontCharacter: "\\ea80" }); +s.trash = new s("trash", { fontCharacter: "\\ea81" }); +s.trashcan = new s("trashcan", { fontCharacter: "\\ea81" }); +s.history = new s("history", { fontCharacter: "\\ea82" }); +s.clock = new s("clock", { fontCharacter: "\\ea82" }); +s.folder = new s("folder", { fontCharacter: "\\ea83" }); +s.fileDirectory = new s("file-directory", { fontCharacter: "\\ea83" }); +s.symbolFolder = new s("symbol-folder", { fontCharacter: "\\ea83" }); +s.logoGithub = new s("logo-github", { fontCharacter: "\\ea84" }); +s.markGithub = new s("mark-github", { fontCharacter: "\\ea84" }); +s.github = new s("github", { fontCharacter: "\\ea84" }); +s.terminal = new s("terminal", { fontCharacter: "\\ea85" }); +s.console = new s("console", { fontCharacter: "\\ea85" }); +s.repl = new s("repl", { fontCharacter: "\\ea85" }); +s.zap = new s("zap", { fontCharacter: "\\ea86" }); +s.symbolEvent = new s("symbol-event", { fontCharacter: "\\ea86" }); +s.error = new s("error", { fontCharacter: "\\ea87" }); +s.stop = new s("stop", { fontCharacter: "\\ea87" }); +s.variable = new s("variable", { fontCharacter: "\\ea88" }); +s.symbolVariable = new s("symbol-variable", { fontCharacter: "\\ea88" }); +s.array = new s("array", { fontCharacter: "\\ea8a" }); +s.symbolArray = new s("symbol-array", { fontCharacter: "\\ea8a" }); +s.symbolModule = new s("symbol-module", { fontCharacter: "\\ea8b" }); +s.symbolPackage = new s("symbol-package", { fontCharacter: "\\ea8b" }); +s.symbolNamespace = new s("symbol-namespace", { fontCharacter: "\\ea8b" }); +s.symbolObject = new s("symbol-object", { fontCharacter: "\\ea8b" }); +s.symbolMethod = new s("symbol-method", { fontCharacter: "\\ea8c" }); +s.symbolFunction = new s("symbol-function", { fontCharacter: "\\ea8c" }); +s.symbolConstructor = new s("symbol-constructor", { fontCharacter: "\\ea8c" }); +s.symbolBoolean = new s("symbol-boolean", { fontCharacter: "\\ea8f" }); +s.symbolNull = new s("symbol-null", { fontCharacter: "\\ea8f" }); +s.symbolNumeric = new s("symbol-numeric", { fontCharacter: "\\ea90" }); +s.symbolNumber = new s("symbol-number", { fontCharacter: "\\ea90" }); +s.symbolStructure = new s("symbol-structure", { fontCharacter: "\\ea91" }); +s.symbolStruct = new s("symbol-struct", { fontCharacter: "\\ea91" }); +s.symbolParameter = new s("symbol-parameter", { fontCharacter: "\\ea92" }); +s.symbolTypeParameter = new s("symbol-type-parameter", { fontCharacter: "\\ea92" }); +s.symbolKey = new s("symbol-key", { fontCharacter: "\\ea93" }); +s.symbolText = new s("symbol-text", { fontCharacter: "\\ea93" }); +s.symbolReference = new s("symbol-reference", { fontCharacter: "\\ea94" }); +s.goToFile = new s("go-to-file", { fontCharacter: "\\ea94" }); +s.symbolEnum = new s("symbol-enum", { fontCharacter: "\\ea95" }); +s.symbolValue = new s("symbol-value", { fontCharacter: "\\ea95" }); +s.symbolRuler = new s("symbol-ruler", { fontCharacter: "\\ea96" }); +s.symbolUnit = new s("symbol-unit", { fontCharacter: "\\ea96" }); +s.activateBreakpoints = new s("activate-breakpoints", { fontCharacter: "\\ea97" }); +s.archive = new s("archive", { fontCharacter: "\\ea98" }); +s.arrowBoth = new s("arrow-both", { fontCharacter: "\\ea99" }); +s.arrowDown = new s("arrow-down", { fontCharacter: "\\ea9a" }); +s.arrowLeft = new s("arrow-left", { fontCharacter: "\\ea9b" }); +s.arrowRight = new s("arrow-right", { fontCharacter: "\\ea9c" }); +s.arrowSmallDown = new s("arrow-small-down", { fontCharacter: "\\ea9d" }); +s.arrowSmallLeft = new s("arrow-small-left", { fontCharacter: "\\ea9e" }); +s.arrowSmallRight = new s("arrow-small-right", { fontCharacter: "\\ea9f" }); +s.arrowSmallUp = new s("arrow-small-up", { fontCharacter: "\\eaa0" }); +s.arrowUp = new s("arrow-up", { fontCharacter: "\\eaa1" }); +s.bell = new s("bell", { fontCharacter: "\\eaa2" }); +s.bold = new s("bold", { fontCharacter: "\\eaa3" }); +s.book = new s("book", { fontCharacter: "\\eaa4" }); +s.bookmark = new s("bookmark", { fontCharacter: "\\eaa5" }); +s.debugBreakpointConditionalUnverified = new s("debug-breakpoint-conditional-unverified", { fontCharacter: "\\eaa6" }); +s.debugBreakpointConditional = new s("debug-breakpoint-conditional", { fontCharacter: "\\eaa7" }); +s.debugBreakpointConditionalDisabled = new s("debug-breakpoint-conditional-disabled", { fontCharacter: "\\eaa7" }); +s.debugBreakpointDataUnverified = new s("debug-breakpoint-data-unverified", { fontCharacter: "\\eaa8" }); +s.debugBreakpointData = new s("debug-breakpoint-data", { fontCharacter: "\\eaa9" }); +s.debugBreakpointDataDisabled = new s("debug-breakpoint-data-disabled", { fontCharacter: "\\eaa9" }); +s.debugBreakpointLogUnverified = new s("debug-breakpoint-log-unverified", { fontCharacter: "\\eaaa" }); +s.debugBreakpointLog = new s("debug-breakpoint-log", { fontCharacter: "\\eaab" }); +s.debugBreakpointLogDisabled = new s("debug-breakpoint-log-disabled", { fontCharacter: "\\eaab" }); +s.briefcase = new s("briefcase", { fontCharacter: "\\eaac" }); +s.broadcast = new s("broadcast", { fontCharacter: "\\eaad" }); +s.browser = new s("browser", { fontCharacter: "\\eaae" }); +s.bug = new s("bug", { fontCharacter: "\\eaaf" }); +s.calendar = new s("calendar", { fontCharacter: "\\eab0" }); +s.caseSensitive = new s("case-sensitive", { fontCharacter: "\\eab1" }); +s.check = new s("check", { fontCharacter: "\\eab2" }); +s.checklist = new s("checklist", { fontCharacter: "\\eab3" }); +s.chevronDown = new s("chevron-down", { fontCharacter: "\\eab4" }); +s.dropDownButton = new s("drop-down-button", s.chevronDown.definition); +s.chevronLeft = new s("chevron-left", { fontCharacter: "\\eab5" }); +s.chevronRight = new s("chevron-right", { fontCharacter: "\\eab6" }); +s.chevronUp = new s("chevron-up", { fontCharacter: "\\eab7" }); +s.chromeClose = new s("chrome-close", { fontCharacter: "\\eab8" }); +s.chromeMaximize = new s("chrome-maximize", { fontCharacter: "\\eab9" }); +s.chromeMinimize = new s("chrome-minimize", { fontCharacter: "\\eaba" }); +s.chromeRestore = new s("chrome-restore", { fontCharacter: "\\eabb" }); +s.circleOutline = new s("circle-outline", { fontCharacter: "\\eabc" }); +s.debugBreakpointUnverified = new s("debug-breakpoint-unverified", { fontCharacter: "\\eabc" }); +s.circleSlash = new s("circle-slash", { fontCharacter: "\\eabd" }); +s.circuitBoard = new s("circuit-board", { fontCharacter: "\\eabe" }); +s.clearAll = new s("clear-all", { fontCharacter: "\\eabf" }); +s.clippy = new s("clippy", { fontCharacter: "\\eac0" }); +s.closeAll = new s("close-all", { fontCharacter: "\\eac1" }); +s.cloudDownload = new s("cloud-download", { fontCharacter: "\\eac2" }); +s.cloudUpload = new s("cloud-upload", { fontCharacter: "\\eac3" }); +s.code = new s("code", { fontCharacter: "\\eac4" }); +s.collapseAll = new s("collapse-all", { fontCharacter: "\\eac5" }); +s.colorMode = new s("color-mode", { fontCharacter: "\\eac6" }); +s.commentDiscussion = new s("comment-discussion", { fontCharacter: "\\eac7" }); +s.compareChanges = new s("compare-changes", { fontCharacter: "\\eafd" }); +s.creditCard = new s("credit-card", { fontCharacter: "\\eac9" }); +s.dash = new s("dash", { fontCharacter: "\\eacc" }); +s.dashboard = new s("dashboard", { fontCharacter: "\\eacd" }); +s.database = new s("database", { fontCharacter: "\\eace" }); +s.debugContinue = new s("debug-continue", { fontCharacter: "\\eacf" }); +s.debugDisconnect = new s("debug-disconnect", { fontCharacter: "\\ead0" }); +s.debugPause = new s("debug-pause", { fontCharacter: "\\ead1" }); +s.debugRestart = new s("debug-restart", { fontCharacter: "\\ead2" }); +s.debugStart = new s("debug-start", { fontCharacter: "\\ead3" }); +s.debugStepInto = new s("debug-step-into", { fontCharacter: "\\ead4" }); +s.debugStepOut = new s("debug-step-out", { fontCharacter: "\\ead5" }); +s.debugStepOver = new s("debug-step-over", { fontCharacter: "\\ead6" }); +s.debugStop = new s("debug-stop", { fontCharacter: "\\ead7" }); +s.debug = new s("debug", { fontCharacter: "\\ead8" }); +s.deviceCameraVideo = new s("device-camera-video", { fontCharacter: "\\ead9" }); +s.deviceCamera = new s("device-camera", { fontCharacter: "\\eada" }); +s.deviceMobile = new s("device-mobile", { fontCharacter: "\\eadb" }); +s.diffAdded = new s("diff-added", { fontCharacter: "\\eadc" }); +s.diffIgnored = new s("diff-ignored", { fontCharacter: "\\eadd" }); +s.diffModified = new s("diff-modified", { fontCharacter: "\\eade" }); +s.diffRemoved = new s("diff-removed", { fontCharacter: "\\eadf" }); +s.diffRenamed = new s("diff-renamed", { fontCharacter: "\\eae0" }); +s.diff = new s("diff", { fontCharacter: "\\eae1" }); +s.discard = new s("discard", { fontCharacter: "\\eae2" }); +s.editorLayout = new s("editor-layout", { fontCharacter: "\\eae3" }); +s.emptyWindow = new s("empty-window", { fontCharacter: "\\eae4" }); +s.exclude = new s("exclude", { fontCharacter: "\\eae5" }); +s.extensions = new s("extensions", { fontCharacter: "\\eae6" }); +s.eyeClosed = new s("eye-closed", { fontCharacter: "\\eae7" }); +s.fileBinary = new s("file-binary", { fontCharacter: "\\eae8" }); +s.fileCode = new s("file-code", { fontCharacter: "\\eae9" }); +s.fileMedia = new s("file-media", { fontCharacter: "\\eaea" }); +s.filePdf = new s("file-pdf", { fontCharacter: "\\eaeb" }); +s.fileSubmodule = new s("file-submodule", { fontCharacter: "\\eaec" }); +s.fileSymlinkDirectory = new s("file-symlink-directory", { fontCharacter: "\\eaed" }); +s.fileSymlinkFile = new s("file-symlink-file", { fontCharacter: "\\eaee" }); +s.fileZip = new s("file-zip", { fontCharacter: "\\eaef" }); +s.files = new s("files", { fontCharacter: "\\eaf0" }); +s.filter = new s("filter", { fontCharacter: "\\eaf1" }); +s.flame = new s("flame", { fontCharacter: "\\eaf2" }); +s.foldDown = new s("fold-down", { fontCharacter: "\\eaf3" }); +s.foldUp = new s("fold-up", { fontCharacter: "\\eaf4" }); +s.fold = new s("fold", { fontCharacter: "\\eaf5" }); +s.folderActive = new s("folder-active", { fontCharacter: "\\eaf6" }); +s.folderOpened = new s("folder-opened", { fontCharacter: "\\eaf7" }); +s.gear = new s("gear", { fontCharacter: "\\eaf8" }); +s.gift = new s("gift", { fontCharacter: "\\eaf9" }); +s.gistSecret = new s("gist-secret", { fontCharacter: "\\eafa" }); +s.gist = new s("gist", { fontCharacter: "\\eafb" }); +s.gitCommit = new s("git-commit", { fontCharacter: "\\eafc" }); +s.gitCompare = new s("git-compare", { fontCharacter: "\\eafd" }); +s.gitMerge = new s("git-merge", { fontCharacter: "\\eafe" }); +s.githubAction = new s("github-action", { fontCharacter: "\\eaff" }); +s.githubAlt = new s("github-alt", { fontCharacter: "\\eb00" }); +s.globe = new s("globe", { fontCharacter: "\\eb01" }); +s.grabber = new s("grabber", { fontCharacter: "\\eb02" }); +s.graph = new s("graph", { fontCharacter: "\\eb03" }); +s.gripper = new s("gripper", { fontCharacter: "\\eb04" }); +s.heart = new s("heart", { fontCharacter: "\\eb05" }); +s.home = new s("home", { fontCharacter: "\\eb06" }); +s.horizontalRule = new s("horizontal-rule", { fontCharacter: "\\eb07" }); +s.hubot = new s("hubot", { fontCharacter: "\\eb08" }); +s.inbox = new s("inbox", { fontCharacter: "\\eb09" }); +s.issueClosed = new s("issue-closed", { fontCharacter: "\\eba4" }); +s.issueReopened = new s("issue-reopened", { fontCharacter: "\\eb0b" }); +s.issues = new s("issues", { fontCharacter: "\\eb0c" }); +s.italic = new s("italic", { fontCharacter: "\\eb0d" }); +s.jersey = new s("jersey", { fontCharacter: "\\eb0e" }); +s.json = new s("json", { fontCharacter: "\\eb0f" }); +s.kebabVertical = new s("kebab-vertical", { fontCharacter: "\\eb10" }); +s.key = new s("key", { fontCharacter: "\\eb11" }); +s.law = new s("law", { fontCharacter: "\\eb12" }); +s.lightbulbAutofix = new s("lightbulb-autofix", { fontCharacter: "\\eb13" }); +s.linkExternal = new s("link-external", { fontCharacter: "\\eb14" }); +s.link = new s("link", { fontCharacter: "\\eb15" }); +s.listOrdered = new s("list-ordered", { fontCharacter: "\\eb16" }); +s.listUnordered = new s("list-unordered", { fontCharacter: "\\eb17" }); +s.liveShare = new s("live-share", { fontCharacter: "\\eb18" }); +s.loading = new s("loading", { fontCharacter: "\\eb19" }); +s.location = new s("location", { fontCharacter: "\\eb1a" }); +s.mailRead = new s("mail-read", { fontCharacter: "\\eb1b" }); +s.mail = new s("mail", { fontCharacter: "\\eb1c" }); +s.markdown = new s("markdown", { fontCharacter: "\\eb1d" }); +s.megaphone = new s("megaphone", { fontCharacter: "\\eb1e" }); +s.mention = new s("mention", { fontCharacter: "\\eb1f" }); +s.milestone = new s("milestone", { fontCharacter: "\\eb20" }); +s.mortarBoard = new s("mortar-board", { fontCharacter: "\\eb21" }); +s.move = new s("move", { fontCharacter: "\\eb22" }); +s.multipleWindows = new s("multiple-windows", { fontCharacter: "\\eb23" }); +s.mute = new s("mute", { fontCharacter: "\\eb24" }); +s.noNewline = new s("no-newline", { fontCharacter: "\\eb25" }); +s.note = new s("note", { fontCharacter: "\\eb26" }); +s.octoface = new s("octoface", { fontCharacter: "\\eb27" }); +s.openPreview = new s("open-preview", { fontCharacter: "\\eb28" }); +s.package_ = new s("package", { fontCharacter: "\\eb29" }); +s.paintcan = new s("paintcan", { fontCharacter: "\\eb2a" }); +s.pin = new s("pin", { fontCharacter: "\\eb2b" }); +s.play = new s("play", { fontCharacter: "\\eb2c" }); +s.run = new s("run", { fontCharacter: "\\eb2c" }); +s.plug = new s("plug", { fontCharacter: "\\eb2d" }); +s.preserveCase = new s("preserve-case", { fontCharacter: "\\eb2e" }); +s.preview = new s("preview", { fontCharacter: "\\eb2f" }); +s.project = new s("project", { fontCharacter: "\\eb30" }); +s.pulse = new s("pulse", { fontCharacter: "\\eb31" }); +s.question = new s("question", { fontCharacter: "\\eb32" }); +s.quote = new s("quote", { fontCharacter: "\\eb33" }); +s.radioTower = new s("radio-tower", { fontCharacter: "\\eb34" }); +s.reactions = new s("reactions", { fontCharacter: "\\eb35" }); +s.references = new s("references", { fontCharacter: "\\eb36" }); +s.refresh = new s("refresh", { fontCharacter: "\\eb37" }); +s.regex = new s("regex", { fontCharacter: "\\eb38" }); +s.remoteExplorer = new s("remote-explorer", { fontCharacter: "\\eb39" }); +s.remote = new s("remote", { fontCharacter: "\\eb3a" }); +s.remove = new s("remove", { fontCharacter: "\\eb3b" }); +s.replaceAll = new s("replace-all", { fontCharacter: "\\eb3c" }); +s.replace = new s("replace", { fontCharacter: "\\eb3d" }); +s.repoClone = new s("repo-clone", { fontCharacter: "\\eb3e" }); +s.repoForcePush = new s("repo-force-push", { fontCharacter: "\\eb3f" }); +s.repoPull = new s("repo-pull", { fontCharacter: "\\eb40" }); +s.repoPush = new s("repo-push", { fontCharacter: "\\eb41" }); +s.report = new s("report", { fontCharacter: "\\eb42" }); +s.requestChanges = new s("request-changes", { fontCharacter: "\\eb43" }); +s.rocket = new s("rocket", { fontCharacter: "\\eb44" }); +s.rootFolderOpened = new s("root-folder-opened", { fontCharacter: "\\eb45" }); +s.rootFolder = new s("root-folder", { fontCharacter: "\\eb46" }); +s.rss = new s("rss", { fontCharacter: "\\eb47" }); +s.ruby = new s("ruby", { fontCharacter: "\\eb48" }); +s.saveAll = new s("save-all", { fontCharacter: "\\eb49" }); +s.saveAs = new s("save-as", { fontCharacter: "\\eb4a" }); +s.save = new s("save", { fontCharacter: "\\eb4b" }); +s.screenFull = new s("screen-full", { fontCharacter: "\\eb4c" }); +s.screenNormal = new s("screen-normal", { fontCharacter: "\\eb4d" }); +s.searchStop = new s("search-stop", { fontCharacter: "\\eb4e" }); +s.server = new s("server", { fontCharacter: "\\eb50" }); +s.settingsGear = new s("settings-gear", { fontCharacter: "\\eb51" }); +s.settings = new s("settings", { fontCharacter: "\\eb52" }); +s.shield = new s("shield", { fontCharacter: "\\eb53" }); +s.smiley = new s("smiley", { fontCharacter: "\\eb54" }); +s.sortPrecedence = new s("sort-precedence", { fontCharacter: "\\eb55" }); +s.splitHorizontal = new s("split-horizontal", { fontCharacter: "\\eb56" }); +s.splitVertical = new s("split-vertical", { fontCharacter: "\\eb57" }); +s.squirrel = new s("squirrel", { fontCharacter: "\\eb58" }); +s.starFull = new s("star-full", { fontCharacter: "\\eb59" }); +s.starHalf = new s("star-half", { fontCharacter: "\\eb5a" }); +s.symbolClass = new s("symbol-class", { fontCharacter: "\\eb5b" }); +s.symbolColor = new s("symbol-color", { fontCharacter: "\\eb5c" }); +s.symbolCustomColor = new s("symbol-customcolor", { fontCharacter: "\\eb5c" }); +s.symbolConstant = new s("symbol-constant", { fontCharacter: "\\eb5d" }); +s.symbolEnumMember = new s("symbol-enum-member", { fontCharacter: "\\eb5e" }); +s.symbolField = new s("symbol-field", { fontCharacter: "\\eb5f" }); +s.symbolFile = new s("symbol-file", { fontCharacter: "\\eb60" }); +s.symbolInterface = new s("symbol-interface", { fontCharacter: "\\eb61" }); +s.symbolKeyword = new s("symbol-keyword", { fontCharacter: "\\eb62" }); +s.symbolMisc = new s("symbol-misc", { fontCharacter: "\\eb63" }); +s.symbolOperator = new s("symbol-operator", { fontCharacter: "\\eb64" }); +s.symbolProperty = new s("symbol-property", { fontCharacter: "\\eb65" }); +s.wrench = new s("wrench", { fontCharacter: "\\eb65" }); +s.wrenchSubaction = new s("wrench-subaction", { fontCharacter: "\\eb65" }); +s.symbolSnippet = new s("symbol-snippet", { fontCharacter: "\\eb66" }); +s.tasklist = new s("tasklist", { fontCharacter: "\\eb67" }); +s.telescope = new s("telescope", { fontCharacter: "\\eb68" }); +s.textSize = new s("text-size", { fontCharacter: "\\eb69" }); +s.threeBars = new s("three-bars", { fontCharacter: "\\eb6a" }); +s.thumbsdown = new s("thumbsdown", { fontCharacter: "\\eb6b" }); +s.thumbsup = new s("thumbsup", { fontCharacter: "\\eb6c" }); +s.tools = new s("tools", { fontCharacter: "\\eb6d" }); +s.triangleDown = new s("triangle-down", { fontCharacter: "\\eb6e" }); +s.triangleLeft = new s("triangle-left", { fontCharacter: "\\eb6f" }); +s.triangleRight = new s("triangle-right", { fontCharacter: "\\eb70" }); +s.triangleUp = new s("triangle-up", { fontCharacter: "\\eb71" }); +s.twitter = new s("twitter", { fontCharacter: "\\eb72" }); +s.unfold = new s("unfold", { fontCharacter: "\\eb73" }); +s.unlock = new s("unlock", { fontCharacter: "\\eb74" }); +s.unmute = new s("unmute", { fontCharacter: "\\eb75" }); +s.unverified = new s("unverified", { fontCharacter: "\\eb76" }); +s.verified = new s("verified", { fontCharacter: "\\eb77" }); +s.versions = new s("versions", { fontCharacter: "\\eb78" }); +s.vmActive = new s("vm-active", { fontCharacter: "\\eb79" }); +s.vmOutline = new s("vm-outline", { fontCharacter: "\\eb7a" }); +s.vmRunning = new s("vm-running", { fontCharacter: "\\eb7b" }); +s.watch = new s("watch", { fontCharacter: "\\eb7c" }); +s.whitespace = new s("whitespace", { fontCharacter: "\\eb7d" }); +s.wholeWord = new s("whole-word", { fontCharacter: "\\eb7e" }); +s.window = new s("window", { fontCharacter: "\\eb7f" }); +s.wordWrap = new s("word-wrap", { fontCharacter: "\\eb80" }); +s.zoomIn = new s("zoom-in", { fontCharacter: "\\eb81" }); +s.zoomOut = new s("zoom-out", { fontCharacter: "\\eb82" }); +s.listFilter = new s("list-filter", { fontCharacter: "\\eb83" }); +s.listFlat = new s("list-flat", { fontCharacter: "\\eb84" }); +s.listSelection = new s("list-selection", { fontCharacter: "\\eb85" }); +s.selection = new s("selection", { fontCharacter: "\\eb85" }); +s.listTree = new s("list-tree", { fontCharacter: "\\eb86" }); +s.debugBreakpointFunctionUnverified = new s("debug-breakpoint-function-unverified", { fontCharacter: "\\eb87" }); +s.debugBreakpointFunction = new s("debug-breakpoint-function", { fontCharacter: "\\eb88" }); +s.debugBreakpointFunctionDisabled = new s("debug-breakpoint-function-disabled", { fontCharacter: "\\eb88" }); +s.debugStackframeActive = new s("debug-stackframe-active", { fontCharacter: "\\eb89" }); +s.debugStackframeDot = new s("debug-stackframe-dot", { fontCharacter: "\\eb8a" }); +s.debugStackframe = new s("debug-stackframe", { fontCharacter: "\\eb8b" }); +s.debugStackframeFocused = new s("debug-stackframe-focused", { fontCharacter: "\\eb8b" }); +s.debugBreakpointUnsupported = new s("debug-breakpoint-unsupported", { fontCharacter: "\\eb8c" }); +s.symbolString = new s("symbol-string", { fontCharacter: "\\eb8d" }); +s.debugReverseContinue = new s("debug-reverse-continue", { fontCharacter: "\\eb8e" }); +s.debugStepBack = new s("debug-step-back", { fontCharacter: "\\eb8f" }); +s.debugRestartFrame = new s("debug-restart-frame", { fontCharacter: "\\eb90" }); +s.callIncoming = new s("call-incoming", { fontCharacter: "\\eb92" }); +s.callOutgoing = new s("call-outgoing", { fontCharacter: "\\eb93" }); +s.menu = new s("menu", { fontCharacter: "\\eb94" }); +s.expandAll = new s("expand-all", { fontCharacter: "\\eb95" }); +s.feedback = new s("feedback", { fontCharacter: "\\eb96" }); +s.groupByRefType = new s("group-by-ref-type", { fontCharacter: "\\eb97" }); +s.ungroupByRefType = new s("ungroup-by-ref-type", { fontCharacter: "\\eb98" }); +s.account = new s("account", { fontCharacter: "\\eb99" }); +s.bellDot = new s("bell-dot", { fontCharacter: "\\eb9a" }); +s.debugConsole = new s("debug-console", { fontCharacter: "\\eb9b" }); +s.library = new s("library", { fontCharacter: "\\eb9c" }); +s.output = new s("output", { fontCharacter: "\\eb9d" }); +s.runAll = new s("run-all", { fontCharacter: "\\eb9e" }); +s.syncIgnored = new s("sync-ignored", { fontCharacter: "\\eb9f" }); +s.pinned = new s("pinned", { fontCharacter: "\\eba0" }); +s.githubInverted = new s("github-inverted", { fontCharacter: "\\eba1" }); +s.debugAlt = new s("debug-alt", { fontCharacter: "\\eb91" }); +s.serverProcess = new s("server-process", { fontCharacter: "\\eba2" }); +s.serverEnvironment = new s("server-environment", { fontCharacter: "\\eba3" }); +s.pass = new s("pass", { fontCharacter: "\\eba4" }); +s.stopCircle = new s("stop-circle", { fontCharacter: "\\eba5" }); +s.playCircle = new s("play-circle", { fontCharacter: "\\eba6" }); +s.record = new s("record", { fontCharacter: "\\eba7" }); +s.debugAltSmall = new s("debug-alt-small", { fontCharacter: "\\eba8" }); +s.vmConnect = new s("vm-connect", { fontCharacter: "\\eba9" }); +s.cloud = new s("cloud", { fontCharacter: "\\ebaa" }); +s.merge = new s("merge", { fontCharacter: "\\ebab" }); +s.exportIcon = new s("export", { fontCharacter: "\\ebac" }); +s.graphLeft = new s("graph-left", { fontCharacter: "\\ebad" }); +s.magnet = new s("magnet", { fontCharacter: "\\ebae" }); +s.notebook = new s("notebook", { fontCharacter: "\\ebaf" }); +s.redo = new s("redo", { fontCharacter: "\\ebb0" }); +s.checkAll = new s("check-all", { fontCharacter: "\\ebb1" }); +s.pinnedDirty = new s("pinned-dirty", { fontCharacter: "\\ebb2" }); +s.passFilled = new s("pass-filled", { fontCharacter: "\\ebb3" }); +s.circleLargeFilled = new s("circle-large-filled", { fontCharacter: "\\ebb4" }); +s.circleLargeOutline = new s("circle-large-outline", { fontCharacter: "\\ebb5" }); +s.combine = new s("combine", { fontCharacter: "\\ebb6" }); +s.gather = new s("gather", { fontCharacter: "\\ebb6" }); +s.table = new s("table", { fontCharacter: "\\ebb7" }); +s.variableGroup = new s("variable-group", { fontCharacter: "\\ebb8" }); +s.typeHierarchy = new s("type-hierarchy", { fontCharacter: "\\ebb9" }); +s.typeHierarchySub = new s("type-hierarchy-sub", { fontCharacter: "\\ebba" }); +s.typeHierarchySuper = new s("type-hierarchy-super", { fontCharacter: "\\ebbb" }); +s.gitPullRequestCreate = new s("git-pull-request-create", { fontCharacter: "\\ebbc" }); +s.runAbove = new s("run-above", { fontCharacter: "\\ebbd" }); +s.runBelow = new s("run-below", { fontCharacter: "\\ebbe" }); +s.notebookTemplate = new s("notebook-template", { fontCharacter: "\\ebbf" }); +s.debugRerun = new s("debug-rerun", { fontCharacter: "\\ebc0" }); +s.workspaceTrusted = new s("workspace-trusted", { fontCharacter: "\\ebc1" }); +s.workspaceUntrusted = new s("workspace-untrusted", { fontCharacter: "\\ebc2" }); +s.workspaceUnspecified = new s("workspace-unspecified", { fontCharacter: "\\ebc3" }); +s.terminalCmd = new s("terminal-cmd", { fontCharacter: "\\ebc4" }); +s.terminalDebian = new s("terminal-debian", { fontCharacter: "\\ebc5" }); +s.terminalLinux = new s("terminal-linux", { fontCharacter: "\\ebc6" }); +s.terminalPowershell = new s("terminal-powershell", { fontCharacter: "\\ebc7" }); +s.terminalTmux = new s("terminal-tmux", { fontCharacter: "\\ebc8" }); +s.terminalUbuntu = new s("terminal-ubuntu", { fontCharacter: "\\ebc9" }); +s.terminalBash = new s("terminal-bash", { fontCharacter: "\\ebca" }); +s.arrowSwap = new s("arrow-swap", { fontCharacter: "\\ebcb" }); +s.copy = new s("copy", { fontCharacter: "\\ebcc" }); +s.personAdd = new s("person-add", { fontCharacter: "\\ebcd" }); +s.filterFilled = new s("filter-filled", { fontCharacter: "\\ebce" }); +s.wand = new s("wand", { fontCharacter: "\\ebcf" }); +s.debugLineByLine = new s("debug-line-by-line", { fontCharacter: "\\ebd0" }); +s.inspect = new s("inspect", { fontCharacter: "\\ebd1" }); +s.layers = new s("layers", { fontCharacter: "\\ebd2" }); +s.layersDot = new s("layers-dot", { fontCharacter: "\\ebd3" }); +s.layersActive = new s("layers-active", { fontCharacter: "\\ebd4" }); +s.compass = new s("compass", { fontCharacter: "\\ebd5" }); +s.compassDot = new s("compass-dot", { fontCharacter: "\\ebd6" }); +s.compassActive = new s("compass-active", { fontCharacter: "\\ebd7" }); +s.azure = new s("azure", { fontCharacter: "\\ebd8" }); +s.issueDraft = new s("issue-draft", { fontCharacter: "\\ebd9" }); +s.gitPullRequestClosed = new s("git-pull-request-closed", { fontCharacter: "\\ebda" }); +s.gitPullRequestDraft = new s("git-pull-request-draft", { fontCharacter: "\\ebdb" }); +s.debugAll = new s("debug-all", { fontCharacter: "\\ebdc" }); +s.debugCoverage = new s("debug-coverage", { fontCharacter: "\\ebdd" }); +s.runErrors = new s("run-errors", { fontCharacter: "\\ebde" }); +s.folderLibrary = new s("folder-library", { fontCharacter: "\\ebdf" }); +s.debugContinueSmall = new s("debug-continue-small", { fontCharacter: "\\ebe0" }); +s.beakerStop = new s("beaker-stop", { fontCharacter: "\\ebe1" }); +s.graphLine = new s("graph-line", { fontCharacter: "\\ebe2" }); +s.graphScatter = new s("graph-scatter", { fontCharacter: "\\ebe3" }); +s.pieChart = new s("pie-chart", { fontCharacter: "\\ebe4" }); +s.bracket = new s("bracket", s.json.definition); +s.bracketDot = new s("bracket-dot", { fontCharacter: "\\ebe5" }); +s.bracketError = new s("bracket-error", { fontCharacter: "\\ebe6" }); +s.lockSmall = new s("lock-small", { fontCharacter: "\\ebe7" }); +s.azureDevops = new s("azure-devops", { fontCharacter: "\\ebe8" }); +s.verifiedFilled = new s("verified-filled", { fontCharacter: "\\ebe9" }); +s.newLine = new s("newline", { fontCharacter: "\\ebea" }); +s.layout = new s("layout", { fontCharacter: "\\ebeb" }); +s.layoutActivitybarLeft = new s("layout-activitybar-left", { fontCharacter: "\\ebec" }); +s.layoutActivitybarRight = new s("layout-activitybar-right", { fontCharacter: "\\ebed" }); +s.layoutPanelLeft = new s("layout-panel-left", { fontCharacter: "\\ebee" }); +s.layoutPanelCenter = new s("layout-panel-center", { fontCharacter: "\\ebef" }); +s.layoutPanelJustify = new s("layout-panel-justify", { fontCharacter: "\\ebf0" }); +s.layoutPanelRight = new s("layout-panel-right", { fontCharacter: "\\ebf1" }); +s.layoutPanel = new s("layout-panel", { fontCharacter: "\\ebf2" }); +s.layoutSidebarLeft = new s("layout-sidebar-left", { fontCharacter: "\\ebf3" }); +s.layoutSidebarRight = new s("layout-sidebar-right", { fontCharacter: "\\ebf4" }); +s.layoutStatusbar = new s("layout-statusbar", { fontCharacter: "\\ebf5" }); +s.layoutMenubar = new s("layout-menubar", { fontCharacter: "\\ebf6" }); +s.layoutCentered = new s("layout-centered", { fontCharacter: "\\ebf7" }); +s.target = new s("target", { fontCharacter: "\\ebf8" }); +s.indent = new s("indent", { fontCharacter: "\\ebf9" }); +s.recordSmall = new s("record-small", { fontCharacter: "\\ebfa" }); +s.errorSmall = new s("error-small", { fontCharacter: "\\ebfb" }); +s.arrowCircleDown = new s("arrow-circle-down", { fontCharacter: "\\ebfc" }); +s.arrowCircleLeft = new s("arrow-circle-left", { fontCharacter: "\\ebfd" }); +s.arrowCircleRight = new s("arrow-circle-right", { fontCharacter: "\\ebfe" }); +s.arrowCircleUp = new s("arrow-circle-up", { fontCharacter: "\\ebff" }); +s.dialogError = new s("dialog-error", s.error.definition); +s.dialogWarning = new s("dialog-warning", s.warning.definition); +s.dialogInfo = new s("dialog-info", s.info.definition); +s.dialogClose = new s("dialog-close", s.close.definition); +s.treeItemExpanded = new s("tree-item-expanded", s.chevronDown.definition); +s.treeFilterOnTypeOn = new s("tree-filter-on-type-on", s.listFilter.definition); +s.treeFilterOnTypeOff = new s("tree-filter-on-type-off", s.listSelection.definition); +s.treeFilterClear = new s("tree-filter-clear", s.close.definition); +s.treeItemLoading = new s("tree-item-loading", s.loading.definition); +s.menuSelection = new s("menu-selection", s.check.definition); +s.menuSubmenu = new s("menu-submenu", s.chevronRight.definition); +s.menuBarMore = new s("menubar-more", s.more.definition); +s.scrollbarButtonLeft = new s("scrollbar-button-left", s.triangleLeft.definition); +s.scrollbarButtonRight = new s("scrollbar-button-right", s.triangleRight.definition); +s.scrollbarButtonUp = new s("scrollbar-button-up", s.triangleUp.definition); +s.scrollbarButtonDown = new s("scrollbar-button-down", s.triangleDown.definition); +s.toolBarMore = new s("toolbar-more", s.more.definition); +s.quickInputBack = new s("quick-input-back", s.arrowLeft.definition); +var Ni; +(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(a) { + if (a instanceof s) + return ["codicon", "codicon-" + a.id]; + const o = t.exec(a.id); + if (!o) + return n(s.error); + let [, l, h] = o; + const c = ["codicon", "codicon-" + l]; + return h && c.push("codicon-modifier-" + h.substr(1)), c; } - CSSIcon2.asClassNameArray = asClassNameArray; - function asClassName(icon) { - return asClassNameArray(icon).join(" "); + e.asClassNameArray = n; + function r(a) { + return n(a).join(" "); } - CSSIcon2.asClassName = asClassName; - function asCSSSelector(icon) { - return "." + asClassNameArray(icon).join("."); + e.asClassName = r; + function i(a) { + return "." + n(a).join("."); } - CSSIcon2.asCSSSelector = asCSSSelector; -})(CSSIcon || (CSSIcon = {})); -class Token { - constructor(offset, type, language) { - this._tokenBrand = void 0; - this.offset = offset; - this.type = type; - this.language = language; + e.asCSSSelector = i; +})(Ni || (Ni = {})); +class ic { + constructor(t, n, r) { + this._tokenBrand = void 0, this.offset = t, this.type = n, this.language = r; } toString() { return "(" + this.offset + ", " + this.type + ")"; } } -var CompletionItemKinds; -(function(CompletionItemKinds2) { - const byKind = /* @__PURE__ */ new Map(); - byKind.set(0, Codicon.symbolMethod); - byKind.set(1, Codicon.symbolFunction); - byKind.set(2, Codicon.symbolConstructor); - byKind.set(3, Codicon.symbolField); - byKind.set(4, Codicon.symbolVariable); - byKind.set(5, Codicon.symbolClass); - byKind.set(6, Codicon.symbolStruct); - byKind.set(7, Codicon.symbolInterface); - byKind.set(8, Codicon.symbolModule); - byKind.set(9, Codicon.symbolProperty); - byKind.set(10, Codicon.symbolEvent); - byKind.set(11, Codicon.symbolOperator); - byKind.set(12, Codicon.symbolUnit); - byKind.set(13, Codicon.symbolValue); - byKind.set(15, Codicon.symbolEnum); - byKind.set(14, Codicon.symbolConstant); - byKind.set(15, Codicon.symbolEnum); - byKind.set(16, Codicon.symbolEnumMember); - byKind.set(17, Codicon.symbolKeyword); - byKind.set(27, Codicon.symbolSnippet); - byKind.set(18, Codicon.symbolText); - byKind.set(19, Codicon.symbolColor); - byKind.set(20, Codicon.symbolFile); - byKind.set(21, Codicon.symbolReference); - byKind.set(22, Codicon.symbolCustomColor); - byKind.set(23, Codicon.symbolFolder); - byKind.set(24, Codicon.symbolTypeParameter); - byKind.set(25, Codicon.account); - byKind.set(26, Codicon.issues); - function toIcon(kind) { - let codicon = byKind.get(kind); - if (!codicon) { - console.info("No codicon found for CompletionItemKind " + kind); - codicon = Codicon.symbolProperty; - } - return codicon; +var Pi; +(function(e) { + const t = /* @__PURE__ */ new Map(); + t.set(0, s.symbolMethod), t.set(1, s.symbolFunction), t.set(2, s.symbolConstructor), t.set(3, s.symbolField), t.set(4, s.symbolVariable), t.set(5, s.symbolClass), t.set(6, s.symbolStruct), t.set(7, s.symbolInterface), t.set(8, s.symbolModule), t.set(9, s.symbolProperty), t.set(10, s.symbolEvent), t.set(11, s.symbolOperator), t.set(12, s.symbolUnit), t.set(13, s.symbolValue), t.set(15, s.symbolEnum), t.set(14, s.symbolConstant), t.set(15, s.symbolEnum), t.set(16, s.symbolEnumMember), t.set(17, s.symbolKeyword), t.set(27, s.symbolSnippet), t.set(18, s.symbolText), t.set(19, s.symbolColor), t.set(20, s.symbolFile), t.set(21, s.symbolReference), t.set(22, s.symbolCustomColor), t.set(23, s.symbolFolder), t.set(24, s.symbolTypeParameter), t.set(25, s.account), t.set(26, s.issues); + function n(a) { + let o = t.get(a); + return o || (console.info("No codicon found for CompletionItemKind " + a), o = s.symbolProperty), o; } - CompletionItemKinds2.toIcon = toIcon; - const data = /* @__PURE__ */ new Map(); - data.set("method", 0); - data.set("function", 1); - data.set("constructor", 2); - data.set("field", 3); - data.set("variable", 4); - data.set("class", 5); - data.set("struct", 6); - data.set("interface", 7); - data.set("module", 8); - data.set("property", 9); - data.set("event", 10); - data.set("operator", 11); - data.set("unit", 12); - data.set("value", 13); - data.set("constant", 14); - data.set("enum", 15); - data.set("enum-member", 16); - data.set("enumMember", 16); - data.set("keyword", 17); - data.set("snippet", 27); - data.set("text", 18); - data.set("color", 19); - data.set("file", 20); - data.set("reference", 21); - data.set("customcolor", 22); - data.set("folder", 23); - data.set("type-parameter", 24); - data.set("typeParameter", 24); - data.set("account", 25); - data.set("issue", 26); - function fromString(value, strict) { - let res = data.get(value); - if (typeof res === "undefined" && !strict) { - res = 9; - } - return res; + e.toIcon = n; + const r = /* @__PURE__ */ new Map(); + r.set("method", 0), r.set("function", 1), r.set("constructor", 2), r.set("field", 3), r.set("variable", 4), r.set("class", 5), r.set("struct", 6), r.set("interface", 7), r.set("module", 8), r.set("property", 9), r.set("event", 10), r.set("operator", 11), r.set("unit", 12), r.set("value", 13), r.set("constant", 14), r.set("enum", 15), r.set("enum-member", 16), r.set("enumMember", 16), r.set("keyword", 17), r.set("snippet", 27), r.set("text", 18), r.set("color", 19), r.set("file", 20), r.set("reference", 21), r.set("customcolor", 22), r.set("folder", 23), r.set("type-parameter", 24), r.set("typeParameter", 24), r.set("account", 25), r.set("issue", 26); + function i(a, o) { + let l = r.get(a); + return typeof l > "u" && !o && (l = 9), l; } - CompletionItemKinds2.fromString = fromString; -})(CompletionItemKinds || (CompletionItemKinds = {})); -var InlineCompletionTriggerKind$1; -(function(InlineCompletionTriggerKind2) { - InlineCompletionTriggerKind2[InlineCompletionTriggerKind2["Automatic"] = 0] = "Automatic"; - InlineCompletionTriggerKind2[InlineCompletionTriggerKind2["Explicit"] = 1] = "Explicit"; -})(InlineCompletionTriggerKind$1 || (InlineCompletionTriggerKind$1 = {})); -var SignatureHelpTriggerKind$1; -(function(SignatureHelpTriggerKind2) { - SignatureHelpTriggerKind2[SignatureHelpTriggerKind2["Invoke"] = 1] = "Invoke"; - SignatureHelpTriggerKind2[SignatureHelpTriggerKind2["TriggerCharacter"] = 2] = "TriggerCharacter"; - SignatureHelpTriggerKind2[SignatureHelpTriggerKind2["ContentChange"] = 3] = "ContentChange"; -})(SignatureHelpTriggerKind$1 || (SignatureHelpTriggerKind$1 = {})); -var DocumentHighlightKind$2; -(function(DocumentHighlightKind2) { - DocumentHighlightKind2[DocumentHighlightKind2["Text"] = 0] = "Text"; - DocumentHighlightKind2[DocumentHighlightKind2["Read"] = 1] = "Read"; - DocumentHighlightKind2[DocumentHighlightKind2["Write"] = 2] = "Write"; -})(DocumentHighlightKind$2 || (DocumentHighlightKind$2 = {})); -var SymbolKinds; -(function(SymbolKinds2) { - const byKind = /* @__PURE__ */ new Map(); - byKind.set(0, Codicon.symbolFile); - byKind.set(1, Codicon.symbolModule); - byKind.set(2, Codicon.symbolNamespace); - byKind.set(3, Codicon.symbolPackage); - byKind.set(4, Codicon.symbolClass); - byKind.set(5, Codicon.symbolMethod); - byKind.set(6, Codicon.symbolProperty); - byKind.set(7, Codicon.symbolField); - byKind.set(8, Codicon.symbolConstructor); - byKind.set(9, Codicon.symbolEnum); - byKind.set(10, Codicon.symbolInterface); - byKind.set(11, Codicon.symbolFunction); - byKind.set(12, Codicon.symbolVariable); - byKind.set(13, Codicon.symbolConstant); - byKind.set(14, Codicon.symbolString); - byKind.set(15, Codicon.symbolNumber); - byKind.set(16, Codicon.symbolBoolean); - byKind.set(17, Codicon.symbolArray); - byKind.set(18, Codicon.symbolObject); - byKind.set(19, Codicon.symbolKey); - byKind.set(20, Codicon.symbolNull); - byKind.set(21, Codicon.symbolEnumMember); - byKind.set(22, Codicon.symbolStruct); - byKind.set(23, Codicon.symbolEvent); - byKind.set(24, Codicon.symbolOperator); - byKind.set(25, Codicon.symbolTypeParameter); - function toIcon(kind) { - let icon = byKind.get(kind); - if (!icon) { - console.info("No codicon found for SymbolKind " + kind); - icon = Codicon.symbolProperty; - } - return icon; + e.fromString = i; +})(Pi || (Pi = {})); +var Ii; +(function(e) { + e[e.Automatic = 0] = "Automatic", e[e.Explicit = 1] = "Explicit"; +})(Ii || (Ii = {})); +var Li; +(function(e) { + e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"; +})(Li || (Li = {})); +var Ti; +(function(e) { + e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"; +})(Ti || (Ti = {})); +var Wi; +(function(e) { + const t = /* @__PURE__ */ new Map(); + t.set(0, s.symbolFile), t.set(1, s.symbolModule), t.set(2, s.symbolNamespace), t.set(3, s.symbolPackage), t.set(4, s.symbolClass), t.set(5, s.symbolMethod), t.set(6, s.symbolProperty), t.set(7, s.symbolField), t.set(8, s.symbolConstructor), t.set(9, s.symbolEnum), t.set(10, s.symbolInterface), t.set(11, s.symbolFunction), t.set(12, s.symbolVariable), t.set(13, s.symbolConstant), t.set(14, s.symbolString), t.set(15, s.symbolNumber), t.set(16, s.symbolBoolean), t.set(17, s.symbolArray), t.set(18, s.symbolObject), t.set(19, s.symbolKey), t.set(20, s.symbolNull), t.set(21, s.symbolEnumMember), t.set(22, s.symbolStruct), t.set(23, s.symbolEvent), t.set(24, s.symbolOperator), t.set(25, s.symbolTypeParameter); + function n(r) { + let i = t.get(r); + return i || (console.info("No codicon found for SymbolKind " + r), i = s.symbolProperty), i; } - SymbolKinds2.toIcon = toIcon; -})(SymbolKinds || (SymbolKinds = {})); -var Command$1; -(function(Command2) { - function is(obj) { - if (!obj || typeof obj !== "object") { - return false; - } - return typeof obj.id === "string" && typeof obj.title === "string"; + e.toIcon = n; +})(Wi || (Wi = {})); +var Oi; +(function(e) { + function t(n) { + return !n || typeof n != "object" ? !1 : typeof n.id == "string" && typeof n.title == "string"; } - Command2.is = is; -})(Command$1 || (Command$1 = {})); -var InlayHintKind$1; -(function(InlayHintKind2) { - InlayHintKind2[InlayHintKind2["Type"] = 1] = "Type"; - InlayHintKind2[InlayHintKind2["Parameter"] = 2] = "Parameter"; -})(InlayHintKind$1 || (InlayHintKind$1 = {})); -new TokenizationRegistry(); -var AccessibilitySupport; -(function(AccessibilitySupport2) { - AccessibilitySupport2[AccessibilitySupport2["Unknown"] = 0] = "Unknown"; - AccessibilitySupport2[AccessibilitySupport2["Disabled"] = 1] = "Disabled"; - AccessibilitySupport2[AccessibilitySupport2["Enabled"] = 2] = "Enabled"; -})(AccessibilitySupport || (AccessibilitySupport = {})); -var CompletionItemInsertTextRule; -(function(CompletionItemInsertTextRule2) { - CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["KeepWhitespace"] = 1] = "KeepWhitespace"; - CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["InsertAsSnippet"] = 4] = "InsertAsSnippet"; -})(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {})); -var CompletionItemKind$1; -(function(CompletionItemKind2) { - CompletionItemKind2[CompletionItemKind2["Method"] = 0] = "Method"; - CompletionItemKind2[CompletionItemKind2["Function"] = 1] = "Function"; - CompletionItemKind2[CompletionItemKind2["Constructor"] = 2] = "Constructor"; - CompletionItemKind2[CompletionItemKind2["Field"] = 3] = "Field"; - CompletionItemKind2[CompletionItemKind2["Variable"] = 4] = "Variable"; - CompletionItemKind2[CompletionItemKind2["Class"] = 5] = "Class"; - CompletionItemKind2[CompletionItemKind2["Struct"] = 6] = "Struct"; - CompletionItemKind2[CompletionItemKind2["Interface"] = 7] = "Interface"; - CompletionItemKind2[CompletionItemKind2["Module"] = 8] = "Module"; - CompletionItemKind2[CompletionItemKind2["Property"] = 9] = "Property"; - CompletionItemKind2[CompletionItemKind2["Event"] = 10] = "Event"; - CompletionItemKind2[CompletionItemKind2["Operator"] = 11] = "Operator"; - CompletionItemKind2[CompletionItemKind2["Unit"] = 12] = "Unit"; - CompletionItemKind2[CompletionItemKind2["Value"] = 13] = "Value"; - CompletionItemKind2[CompletionItemKind2["Constant"] = 14] = "Constant"; - CompletionItemKind2[CompletionItemKind2["Enum"] = 15] = "Enum"; - CompletionItemKind2[CompletionItemKind2["EnumMember"] = 16] = "EnumMember"; - CompletionItemKind2[CompletionItemKind2["Keyword"] = 17] = "Keyword"; - CompletionItemKind2[CompletionItemKind2["Text"] = 18] = "Text"; - CompletionItemKind2[CompletionItemKind2["Color"] = 19] = "Color"; - CompletionItemKind2[CompletionItemKind2["File"] = 20] = "File"; - CompletionItemKind2[CompletionItemKind2["Reference"] = 21] = "Reference"; - CompletionItemKind2[CompletionItemKind2["Customcolor"] = 22] = "Customcolor"; - CompletionItemKind2[CompletionItemKind2["Folder"] = 23] = "Folder"; - CompletionItemKind2[CompletionItemKind2["TypeParameter"] = 24] = "TypeParameter"; - CompletionItemKind2[CompletionItemKind2["User"] = 25] = "User"; - CompletionItemKind2[CompletionItemKind2["Issue"] = 26] = "Issue"; - CompletionItemKind2[CompletionItemKind2["Snippet"] = 27] = "Snippet"; -})(CompletionItemKind$1 || (CompletionItemKind$1 = {})); -var CompletionItemTag$1; -(function(CompletionItemTag2) { - CompletionItemTag2[CompletionItemTag2["Deprecated"] = 1] = "Deprecated"; -})(CompletionItemTag$1 || (CompletionItemTag$1 = {})); -var CompletionTriggerKind; -(function(CompletionTriggerKind2) { - CompletionTriggerKind2[CompletionTriggerKind2["Invoke"] = 0] = "Invoke"; - CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 1] = "TriggerCharacter"; - CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 2] = "TriggerForIncompleteCompletions"; -})(CompletionTriggerKind || (CompletionTriggerKind = {})); -var ContentWidgetPositionPreference; -(function(ContentWidgetPositionPreference2) { - ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["EXACT"] = 0] = "EXACT"; - ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["ABOVE"] = 1] = "ABOVE"; - ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["BELOW"] = 2] = "BELOW"; -})(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {})); -var CursorChangeReason; -(function(CursorChangeReason2) { - CursorChangeReason2[CursorChangeReason2["NotSet"] = 0] = "NotSet"; - CursorChangeReason2[CursorChangeReason2["ContentFlush"] = 1] = "ContentFlush"; - CursorChangeReason2[CursorChangeReason2["RecoverFromMarkers"] = 2] = "RecoverFromMarkers"; - CursorChangeReason2[CursorChangeReason2["Explicit"] = 3] = "Explicit"; - CursorChangeReason2[CursorChangeReason2["Paste"] = 4] = "Paste"; - CursorChangeReason2[CursorChangeReason2["Undo"] = 5] = "Undo"; - CursorChangeReason2[CursorChangeReason2["Redo"] = 6] = "Redo"; -})(CursorChangeReason || (CursorChangeReason = {})); -var DefaultEndOfLine; -(function(DefaultEndOfLine2) { - DefaultEndOfLine2[DefaultEndOfLine2["LF"] = 1] = "LF"; - DefaultEndOfLine2[DefaultEndOfLine2["CRLF"] = 2] = "CRLF"; -})(DefaultEndOfLine || (DefaultEndOfLine = {})); -var DocumentHighlightKind$1; -(function(DocumentHighlightKind2) { - DocumentHighlightKind2[DocumentHighlightKind2["Text"] = 0] = "Text"; - DocumentHighlightKind2[DocumentHighlightKind2["Read"] = 1] = "Read"; - DocumentHighlightKind2[DocumentHighlightKind2["Write"] = 2] = "Write"; -})(DocumentHighlightKind$1 || (DocumentHighlightKind$1 = {})); -var EditorAutoIndentStrategy; -(function(EditorAutoIndentStrategy2) { - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["None"] = 0] = "None"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Keep"] = 1] = "Keep"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Brackets"] = 2] = "Brackets"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Advanced"] = 3] = "Advanced"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Full"] = 4] = "Full"; -})(EditorAutoIndentStrategy || (EditorAutoIndentStrategy = {})); -var EditorOption; -(function(EditorOption2) { - EditorOption2[EditorOption2["acceptSuggestionOnCommitCharacter"] = 0] = "acceptSuggestionOnCommitCharacter"; - EditorOption2[EditorOption2["acceptSuggestionOnEnter"] = 1] = "acceptSuggestionOnEnter"; - EditorOption2[EditorOption2["accessibilitySupport"] = 2] = "accessibilitySupport"; - EditorOption2[EditorOption2["accessibilityPageSize"] = 3] = "accessibilityPageSize"; - EditorOption2[EditorOption2["ariaLabel"] = 4] = "ariaLabel"; - EditorOption2[EditorOption2["autoClosingBrackets"] = 5] = "autoClosingBrackets"; - EditorOption2[EditorOption2["autoClosingDelete"] = 6] = "autoClosingDelete"; - EditorOption2[EditorOption2["autoClosingOvertype"] = 7] = "autoClosingOvertype"; - EditorOption2[EditorOption2["autoClosingQuotes"] = 8] = "autoClosingQuotes"; - EditorOption2[EditorOption2["autoIndent"] = 9] = "autoIndent"; - EditorOption2[EditorOption2["automaticLayout"] = 10] = "automaticLayout"; - EditorOption2[EditorOption2["autoSurround"] = 11] = "autoSurround"; - EditorOption2[EditorOption2["bracketPairColorization"] = 12] = "bracketPairColorization"; - EditorOption2[EditorOption2["guides"] = 13] = "guides"; - EditorOption2[EditorOption2["codeLens"] = 14] = "codeLens"; - EditorOption2[EditorOption2["codeLensFontFamily"] = 15] = "codeLensFontFamily"; - EditorOption2[EditorOption2["codeLensFontSize"] = 16] = "codeLensFontSize"; - EditorOption2[EditorOption2["colorDecorators"] = 17] = "colorDecorators"; - EditorOption2[EditorOption2["columnSelection"] = 18] = "columnSelection"; - EditorOption2[EditorOption2["comments"] = 19] = "comments"; - EditorOption2[EditorOption2["contextmenu"] = 20] = "contextmenu"; - EditorOption2[EditorOption2["copyWithSyntaxHighlighting"] = 21] = "copyWithSyntaxHighlighting"; - EditorOption2[EditorOption2["cursorBlinking"] = 22] = "cursorBlinking"; - EditorOption2[EditorOption2["cursorSmoothCaretAnimation"] = 23] = "cursorSmoothCaretAnimation"; - EditorOption2[EditorOption2["cursorStyle"] = 24] = "cursorStyle"; - EditorOption2[EditorOption2["cursorSurroundingLines"] = 25] = "cursorSurroundingLines"; - EditorOption2[EditorOption2["cursorSurroundingLinesStyle"] = 26] = "cursorSurroundingLinesStyle"; - EditorOption2[EditorOption2["cursorWidth"] = 27] = "cursorWidth"; - EditorOption2[EditorOption2["disableLayerHinting"] = 28] = "disableLayerHinting"; - EditorOption2[EditorOption2["disableMonospaceOptimizations"] = 29] = "disableMonospaceOptimizations"; - EditorOption2[EditorOption2["domReadOnly"] = 30] = "domReadOnly"; - EditorOption2[EditorOption2["dragAndDrop"] = 31] = "dragAndDrop"; - EditorOption2[EditorOption2["emptySelectionClipboard"] = 32] = "emptySelectionClipboard"; - EditorOption2[EditorOption2["extraEditorClassName"] = 33] = "extraEditorClassName"; - EditorOption2[EditorOption2["fastScrollSensitivity"] = 34] = "fastScrollSensitivity"; - EditorOption2[EditorOption2["find"] = 35] = "find"; - EditorOption2[EditorOption2["fixedOverflowWidgets"] = 36] = "fixedOverflowWidgets"; - EditorOption2[EditorOption2["folding"] = 37] = "folding"; - EditorOption2[EditorOption2["foldingStrategy"] = 38] = "foldingStrategy"; - EditorOption2[EditorOption2["foldingHighlight"] = 39] = "foldingHighlight"; - EditorOption2[EditorOption2["foldingImportsByDefault"] = 40] = "foldingImportsByDefault"; - EditorOption2[EditorOption2["foldingMaximumRegions"] = 41] = "foldingMaximumRegions"; - EditorOption2[EditorOption2["unfoldOnClickAfterEndOfLine"] = 42] = "unfoldOnClickAfterEndOfLine"; - EditorOption2[EditorOption2["fontFamily"] = 43] = "fontFamily"; - EditorOption2[EditorOption2["fontInfo"] = 44] = "fontInfo"; - EditorOption2[EditorOption2["fontLigatures"] = 45] = "fontLigatures"; - EditorOption2[EditorOption2["fontSize"] = 46] = "fontSize"; - EditorOption2[EditorOption2["fontWeight"] = 47] = "fontWeight"; - EditorOption2[EditorOption2["formatOnPaste"] = 48] = "formatOnPaste"; - EditorOption2[EditorOption2["formatOnType"] = 49] = "formatOnType"; - EditorOption2[EditorOption2["glyphMargin"] = 50] = "glyphMargin"; - EditorOption2[EditorOption2["gotoLocation"] = 51] = "gotoLocation"; - EditorOption2[EditorOption2["hideCursorInOverviewRuler"] = 52] = "hideCursorInOverviewRuler"; - EditorOption2[EditorOption2["hover"] = 53] = "hover"; - EditorOption2[EditorOption2["inDiffEditor"] = 54] = "inDiffEditor"; - EditorOption2[EditorOption2["inlineSuggest"] = 55] = "inlineSuggest"; - EditorOption2[EditorOption2["letterSpacing"] = 56] = "letterSpacing"; - EditorOption2[EditorOption2["lightbulb"] = 57] = "lightbulb"; - EditorOption2[EditorOption2["lineDecorationsWidth"] = 58] = "lineDecorationsWidth"; - EditorOption2[EditorOption2["lineHeight"] = 59] = "lineHeight"; - EditorOption2[EditorOption2["lineNumbers"] = 60] = "lineNumbers"; - EditorOption2[EditorOption2["lineNumbersMinChars"] = 61] = "lineNumbersMinChars"; - EditorOption2[EditorOption2["linkedEditing"] = 62] = "linkedEditing"; - EditorOption2[EditorOption2["links"] = 63] = "links"; - EditorOption2[EditorOption2["matchBrackets"] = 64] = "matchBrackets"; - EditorOption2[EditorOption2["minimap"] = 65] = "minimap"; - EditorOption2[EditorOption2["mouseStyle"] = 66] = "mouseStyle"; - EditorOption2[EditorOption2["mouseWheelScrollSensitivity"] = 67] = "mouseWheelScrollSensitivity"; - EditorOption2[EditorOption2["mouseWheelZoom"] = 68] = "mouseWheelZoom"; - EditorOption2[EditorOption2["multiCursorMergeOverlapping"] = 69] = "multiCursorMergeOverlapping"; - EditorOption2[EditorOption2["multiCursorModifier"] = 70] = "multiCursorModifier"; - EditorOption2[EditorOption2["multiCursorPaste"] = 71] = "multiCursorPaste"; - EditorOption2[EditorOption2["occurrencesHighlight"] = 72] = "occurrencesHighlight"; - EditorOption2[EditorOption2["overviewRulerBorder"] = 73] = "overviewRulerBorder"; - EditorOption2[EditorOption2["overviewRulerLanes"] = 74] = "overviewRulerLanes"; - EditorOption2[EditorOption2["padding"] = 75] = "padding"; - EditorOption2[EditorOption2["parameterHints"] = 76] = "parameterHints"; - EditorOption2[EditorOption2["peekWidgetDefaultFocus"] = 77] = "peekWidgetDefaultFocus"; - EditorOption2[EditorOption2["definitionLinkOpensInPeek"] = 78] = "definitionLinkOpensInPeek"; - EditorOption2[EditorOption2["quickSuggestions"] = 79] = "quickSuggestions"; - EditorOption2[EditorOption2["quickSuggestionsDelay"] = 80] = "quickSuggestionsDelay"; - EditorOption2[EditorOption2["readOnly"] = 81] = "readOnly"; - EditorOption2[EditorOption2["renameOnType"] = 82] = "renameOnType"; - EditorOption2[EditorOption2["renderControlCharacters"] = 83] = "renderControlCharacters"; - EditorOption2[EditorOption2["renderFinalNewline"] = 84] = "renderFinalNewline"; - EditorOption2[EditorOption2["renderLineHighlight"] = 85] = "renderLineHighlight"; - EditorOption2[EditorOption2["renderLineHighlightOnlyWhenFocus"] = 86] = "renderLineHighlightOnlyWhenFocus"; - EditorOption2[EditorOption2["renderValidationDecorations"] = 87] = "renderValidationDecorations"; - EditorOption2[EditorOption2["renderWhitespace"] = 88] = "renderWhitespace"; - EditorOption2[EditorOption2["revealHorizontalRightPadding"] = 89] = "revealHorizontalRightPadding"; - EditorOption2[EditorOption2["roundedSelection"] = 90] = "roundedSelection"; - EditorOption2[EditorOption2["rulers"] = 91] = "rulers"; - EditorOption2[EditorOption2["scrollbar"] = 92] = "scrollbar"; - EditorOption2[EditorOption2["scrollBeyondLastColumn"] = 93] = "scrollBeyondLastColumn"; - EditorOption2[EditorOption2["scrollBeyondLastLine"] = 94] = "scrollBeyondLastLine"; - EditorOption2[EditorOption2["scrollPredominantAxis"] = 95] = "scrollPredominantAxis"; - EditorOption2[EditorOption2["selectionClipboard"] = 96] = "selectionClipboard"; - EditorOption2[EditorOption2["selectionHighlight"] = 97] = "selectionHighlight"; - EditorOption2[EditorOption2["selectOnLineNumbers"] = 98] = "selectOnLineNumbers"; - EditorOption2[EditorOption2["showFoldingControls"] = 99] = "showFoldingControls"; - EditorOption2[EditorOption2["showUnused"] = 100] = "showUnused"; - EditorOption2[EditorOption2["snippetSuggestions"] = 101] = "snippetSuggestions"; - EditorOption2[EditorOption2["smartSelect"] = 102] = "smartSelect"; - EditorOption2[EditorOption2["smoothScrolling"] = 103] = "smoothScrolling"; - EditorOption2[EditorOption2["stickyTabStops"] = 104] = "stickyTabStops"; - EditorOption2[EditorOption2["stopRenderingLineAfter"] = 105] = "stopRenderingLineAfter"; - EditorOption2[EditorOption2["suggest"] = 106] = "suggest"; - EditorOption2[EditorOption2["suggestFontSize"] = 107] = "suggestFontSize"; - EditorOption2[EditorOption2["suggestLineHeight"] = 108] = "suggestLineHeight"; - EditorOption2[EditorOption2["suggestOnTriggerCharacters"] = 109] = "suggestOnTriggerCharacters"; - EditorOption2[EditorOption2["suggestSelection"] = 110] = "suggestSelection"; - EditorOption2[EditorOption2["tabCompletion"] = 111] = "tabCompletion"; - EditorOption2[EditorOption2["tabIndex"] = 112] = "tabIndex"; - EditorOption2[EditorOption2["unicodeHighlighting"] = 113] = "unicodeHighlighting"; - EditorOption2[EditorOption2["unusualLineTerminators"] = 114] = "unusualLineTerminators"; - EditorOption2[EditorOption2["useShadowDOM"] = 115] = "useShadowDOM"; - EditorOption2[EditorOption2["useTabStops"] = 116] = "useTabStops"; - EditorOption2[EditorOption2["wordSeparators"] = 117] = "wordSeparators"; - EditorOption2[EditorOption2["wordWrap"] = 118] = "wordWrap"; - EditorOption2[EditorOption2["wordWrapBreakAfterCharacters"] = 119] = "wordWrapBreakAfterCharacters"; - EditorOption2[EditorOption2["wordWrapBreakBeforeCharacters"] = 120] = "wordWrapBreakBeforeCharacters"; - EditorOption2[EditorOption2["wordWrapColumn"] = 121] = "wordWrapColumn"; - EditorOption2[EditorOption2["wordWrapOverride1"] = 122] = "wordWrapOverride1"; - EditorOption2[EditorOption2["wordWrapOverride2"] = 123] = "wordWrapOverride2"; - EditorOption2[EditorOption2["wrappingIndent"] = 124] = "wrappingIndent"; - EditorOption2[EditorOption2["wrappingStrategy"] = 125] = "wrappingStrategy"; - EditorOption2[EditorOption2["showDeprecated"] = 126] = "showDeprecated"; - EditorOption2[EditorOption2["inlayHints"] = 127] = "inlayHints"; - EditorOption2[EditorOption2["editorClassName"] = 128] = "editorClassName"; - EditorOption2[EditorOption2["pixelRatio"] = 129] = "pixelRatio"; - EditorOption2[EditorOption2["tabFocusMode"] = 130] = "tabFocusMode"; - EditorOption2[EditorOption2["layoutInfo"] = 131] = "layoutInfo"; - EditorOption2[EditorOption2["wrappingInfo"] = 132] = "wrappingInfo"; -})(EditorOption || (EditorOption = {})); -var EndOfLinePreference; -(function(EndOfLinePreference2) { - EndOfLinePreference2[EndOfLinePreference2["TextDefined"] = 0] = "TextDefined"; - EndOfLinePreference2[EndOfLinePreference2["LF"] = 1] = "LF"; - EndOfLinePreference2[EndOfLinePreference2["CRLF"] = 2] = "CRLF"; -})(EndOfLinePreference || (EndOfLinePreference = {})); -var EndOfLineSequence; -(function(EndOfLineSequence2) { - EndOfLineSequence2[EndOfLineSequence2["LF"] = 0] = "LF"; - EndOfLineSequence2[EndOfLineSequence2["CRLF"] = 1] = "CRLF"; -})(EndOfLineSequence || (EndOfLineSequence = {})); -var IndentAction; -(function(IndentAction2) { - IndentAction2[IndentAction2["None"] = 0] = "None"; - IndentAction2[IndentAction2["Indent"] = 1] = "Indent"; - IndentAction2[IndentAction2["IndentOutdent"] = 2] = "IndentOutdent"; - IndentAction2[IndentAction2["Outdent"] = 3] = "Outdent"; -})(IndentAction || (IndentAction = {})); -var InjectedTextCursorStops$1; -(function(InjectedTextCursorStops2) { - InjectedTextCursorStops2[InjectedTextCursorStops2["Both"] = 0] = "Both"; - InjectedTextCursorStops2[InjectedTextCursorStops2["Right"] = 1] = "Right"; - InjectedTextCursorStops2[InjectedTextCursorStops2["Left"] = 2] = "Left"; - InjectedTextCursorStops2[InjectedTextCursorStops2["None"] = 3] = "None"; -})(InjectedTextCursorStops$1 || (InjectedTextCursorStops$1 = {})); -var InlayHintKind; -(function(InlayHintKind2) { - InlayHintKind2[InlayHintKind2["Type"] = 1] = "Type"; - InlayHintKind2[InlayHintKind2["Parameter"] = 2] = "Parameter"; -})(InlayHintKind || (InlayHintKind = {})); -var InlineCompletionTriggerKind; -(function(InlineCompletionTriggerKind2) { - InlineCompletionTriggerKind2[InlineCompletionTriggerKind2["Automatic"] = 0] = "Automatic"; - InlineCompletionTriggerKind2[InlineCompletionTriggerKind2["Explicit"] = 1] = "Explicit"; -})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {})); -var KeyCode; -(function(KeyCode2) { - KeyCode2[KeyCode2["DependsOnKbLayout"] = -1] = "DependsOnKbLayout"; - KeyCode2[KeyCode2["Unknown"] = 0] = "Unknown"; - KeyCode2[KeyCode2["Backspace"] = 1] = "Backspace"; - KeyCode2[KeyCode2["Tab"] = 2] = "Tab"; - KeyCode2[KeyCode2["Enter"] = 3] = "Enter"; - KeyCode2[KeyCode2["Shift"] = 4] = "Shift"; - KeyCode2[KeyCode2["Ctrl"] = 5] = "Ctrl"; - KeyCode2[KeyCode2["Alt"] = 6] = "Alt"; - KeyCode2[KeyCode2["PauseBreak"] = 7] = "PauseBreak"; - KeyCode2[KeyCode2["CapsLock"] = 8] = "CapsLock"; - KeyCode2[KeyCode2["Escape"] = 9] = "Escape"; - KeyCode2[KeyCode2["Space"] = 10] = "Space"; - KeyCode2[KeyCode2["PageUp"] = 11] = "PageUp"; - KeyCode2[KeyCode2["PageDown"] = 12] = "PageDown"; - KeyCode2[KeyCode2["End"] = 13] = "End"; - KeyCode2[KeyCode2["Home"] = 14] = "Home"; - KeyCode2[KeyCode2["LeftArrow"] = 15] = "LeftArrow"; - KeyCode2[KeyCode2["UpArrow"] = 16] = "UpArrow"; - KeyCode2[KeyCode2["RightArrow"] = 17] = "RightArrow"; - KeyCode2[KeyCode2["DownArrow"] = 18] = "DownArrow"; - KeyCode2[KeyCode2["Insert"] = 19] = "Insert"; - KeyCode2[KeyCode2["Delete"] = 20] = "Delete"; - KeyCode2[KeyCode2["Digit0"] = 21] = "Digit0"; - KeyCode2[KeyCode2["Digit1"] = 22] = "Digit1"; - KeyCode2[KeyCode2["Digit2"] = 23] = "Digit2"; - KeyCode2[KeyCode2["Digit3"] = 24] = "Digit3"; - KeyCode2[KeyCode2["Digit4"] = 25] = "Digit4"; - KeyCode2[KeyCode2["Digit5"] = 26] = "Digit5"; - KeyCode2[KeyCode2["Digit6"] = 27] = "Digit6"; - KeyCode2[KeyCode2["Digit7"] = 28] = "Digit7"; - KeyCode2[KeyCode2["Digit8"] = 29] = "Digit8"; - KeyCode2[KeyCode2["Digit9"] = 30] = "Digit9"; - KeyCode2[KeyCode2["KeyA"] = 31] = "KeyA"; - KeyCode2[KeyCode2["KeyB"] = 32] = "KeyB"; - KeyCode2[KeyCode2["KeyC"] = 33] = "KeyC"; - KeyCode2[KeyCode2["KeyD"] = 34] = "KeyD"; - KeyCode2[KeyCode2["KeyE"] = 35] = "KeyE"; - KeyCode2[KeyCode2["KeyF"] = 36] = "KeyF"; - KeyCode2[KeyCode2["KeyG"] = 37] = "KeyG"; - KeyCode2[KeyCode2["KeyH"] = 38] = "KeyH"; - KeyCode2[KeyCode2["KeyI"] = 39] = "KeyI"; - KeyCode2[KeyCode2["KeyJ"] = 40] = "KeyJ"; - KeyCode2[KeyCode2["KeyK"] = 41] = "KeyK"; - KeyCode2[KeyCode2["KeyL"] = 42] = "KeyL"; - KeyCode2[KeyCode2["KeyM"] = 43] = "KeyM"; - KeyCode2[KeyCode2["KeyN"] = 44] = "KeyN"; - KeyCode2[KeyCode2["KeyO"] = 45] = "KeyO"; - KeyCode2[KeyCode2["KeyP"] = 46] = "KeyP"; - KeyCode2[KeyCode2["KeyQ"] = 47] = "KeyQ"; - KeyCode2[KeyCode2["KeyR"] = 48] = "KeyR"; - KeyCode2[KeyCode2["KeyS"] = 49] = "KeyS"; - KeyCode2[KeyCode2["KeyT"] = 50] = "KeyT"; - KeyCode2[KeyCode2["KeyU"] = 51] = "KeyU"; - KeyCode2[KeyCode2["KeyV"] = 52] = "KeyV"; - KeyCode2[KeyCode2["KeyW"] = 53] = "KeyW"; - KeyCode2[KeyCode2["KeyX"] = 54] = "KeyX"; - KeyCode2[KeyCode2["KeyY"] = 55] = "KeyY"; - KeyCode2[KeyCode2["KeyZ"] = 56] = "KeyZ"; - KeyCode2[KeyCode2["Meta"] = 57] = "Meta"; - KeyCode2[KeyCode2["ContextMenu"] = 58] = "ContextMenu"; - KeyCode2[KeyCode2["F1"] = 59] = "F1"; - KeyCode2[KeyCode2["F2"] = 60] = "F2"; - KeyCode2[KeyCode2["F3"] = 61] = "F3"; - KeyCode2[KeyCode2["F4"] = 62] = "F4"; - KeyCode2[KeyCode2["F5"] = 63] = "F5"; - KeyCode2[KeyCode2["F6"] = 64] = "F6"; - KeyCode2[KeyCode2["F7"] = 65] = "F7"; - KeyCode2[KeyCode2["F8"] = 66] = "F8"; - KeyCode2[KeyCode2["F9"] = 67] = "F9"; - KeyCode2[KeyCode2["F10"] = 68] = "F10"; - KeyCode2[KeyCode2["F11"] = 69] = "F11"; - KeyCode2[KeyCode2["F12"] = 70] = "F12"; - KeyCode2[KeyCode2["F13"] = 71] = "F13"; - KeyCode2[KeyCode2["F14"] = 72] = "F14"; - KeyCode2[KeyCode2["F15"] = 73] = "F15"; - KeyCode2[KeyCode2["F16"] = 74] = "F16"; - KeyCode2[KeyCode2["F17"] = 75] = "F17"; - KeyCode2[KeyCode2["F18"] = 76] = "F18"; - KeyCode2[KeyCode2["F19"] = 77] = "F19"; - KeyCode2[KeyCode2["NumLock"] = 78] = "NumLock"; - KeyCode2[KeyCode2["ScrollLock"] = 79] = "ScrollLock"; - KeyCode2[KeyCode2["Semicolon"] = 80] = "Semicolon"; - KeyCode2[KeyCode2["Equal"] = 81] = "Equal"; - KeyCode2[KeyCode2["Comma"] = 82] = "Comma"; - KeyCode2[KeyCode2["Minus"] = 83] = "Minus"; - KeyCode2[KeyCode2["Period"] = 84] = "Period"; - KeyCode2[KeyCode2["Slash"] = 85] = "Slash"; - KeyCode2[KeyCode2["Backquote"] = 86] = "Backquote"; - KeyCode2[KeyCode2["BracketLeft"] = 87] = "BracketLeft"; - KeyCode2[KeyCode2["Backslash"] = 88] = "Backslash"; - KeyCode2[KeyCode2["BracketRight"] = 89] = "BracketRight"; - KeyCode2[KeyCode2["Quote"] = 90] = "Quote"; - KeyCode2[KeyCode2["OEM_8"] = 91] = "OEM_8"; - KeyCode2[KeyCode2["IntlBackslash"] = 92] = "IntlBackslash"; - KeyCode2[KeyCode2["Numpad0"] = 93] = "Numpad0"; - KeyCode2[KeyCode2["Numpad1"] = 94] = "Numpad1"; - KeyCode2[KeyCode2["Numpad2"] = 95] = "Numpad2"; - KeyCode2[KeyCode2["Numpad3"] = 96] = "Numpad3"; - KeyCode2[KeyCode2["Numpad4"] = 97] = "Numpad4"; - KeyCode2[KeyCode2["Numpad5"] = 98] = "Numpad5"; - KeyCode2[KeyCode2["Numpad6"] = 99] = "Numpad6"; - KeyCode2[KeyCode2["Numpad7"] = 100] = "Numpad7"; - KeyCode2[KeyCode2["Numpad8"] = 101] = "Numpad8"; - KeyCode2[KeyCode2["Numpad9"] = 102] = "Numpad9"; - KeyCode2[KeyCode2["NumpadMultiply"] = 103] = "NumpadMultiply"; - KeyCode2[KeyCode2["NumpadAdd"] = 104] = "NumpadAdd"; - KeyCode2[KeyCode2["NUMPAD_SEPARATOR"] = 105] = "NUMPAD_SEPARATOR"; - KeyCode2[KeyCode2["NumpadSubtract"] = 106] = "NumpadSubtract"; - KeyCode2[KeyCode2["NumpadDecimal"] = 107] = "NumpadDecimal"; - KeyCode2[KeyCode2["NumpadDivide"] = 108] = "NumpadDivide"; - KeyCode2[KeyCode2["KEY_IN_COMPOSITION"] = 109] = "KEY_IN_COMPOSITION"; - KeyCode2[KeyCode2["ABNT_C1"] = 110] = "ABNT_C1"; - KeyCode2[KeyCode2["ABNT_C2"] = 111] = "ABNT_C2"; - KeyCode2[KeyCode2["AudioVolumeMute"] = 112] = "AudioVolumeMute"; - KeyCode2[KeyCode2["AudioVolumeUp"] = 113] = "AudioVolumeUp"; - KeyCode2[KeyCode2["AudioVolumeDown"] = 114] = "AudioVolumeDown"; - KeyCode2[KeyCode2["BrowserSearch"] = 115] = "BrowserSearch"; - KeyCode2[KeyCode2["BrowserHome"] = 116] = "BrowserHome"; - KeyCode2[KeyCode2["BrowserBack"] = 117] = "BrowserBack"; - KeyCode2[KeyCode2["BrowserForward"] = 118] = "BrowserForward"; - KeyCode2[KeyCode2["MediaTrackNext"] = 119] = "MediaTrackNext"; - KeyCode2[KeyCode2["MediaTrackPrevious"] = 120] = "MediaTrackPrevious"; - KeyCode2[KeyCode2["MediaStop"] = 121] = "MediaStop"; - KeyCode2[KeyCode2["MediaPlayPause"] = 122] = "MediaPlayPause"; - KeyCode2[KeyCode2["LaunchMediaPlayer"] = 123] = "LaunchMediaPlayer"; - KeyCode2[KeyCode2["LaunchMail"] = 124] = "LaunchMail"; - KeyCode2[KeyCode2["LaunchApp2"] = 125] = "LaunchApp2"; - KeyCode2[KeyCode2["Clear"] = 126] = "Clear"; - KeyCode2[KeyCode2["MAX_VALUE"] = 127] = "MAX_VALUE"; -})(KeyCode || (KeyCode = {})); -var MarkerSeverity; -(function(MarkerSeverity2) { - MarkerSeverity2[MarkerSeverity2["Hint"] = 1] = "Hint"; - MarkerSeverity2[MarkerSeverity2["Info"] = 2] = "Info"; - MarkerSeverity2[MarkerSeverity2["Warning"] = 4] = "Warning"; - MarkerSeverity2[MarkerSeverity2["Error"] = 8] = "Error"; -})(MarkerSeverity || (MarkerSeverity = {})); -var MarkerTag; -(function(MarkerTag2) { - MarkerTag2[MarkerTag2["Unnecessary"] = 1] = "Unnecessary"; - MarkerTag2[MarkerTag2["Deprecated"] = 2] = "Deprecated"; -})(MarkerTag || (MarkerTag = {})); -var MinimapPosition$1; -(function(MinimapPosition2) { - MinimapPosition2[MinimapPosition2["Inline"] = 1] = "Inline"; - MinimapPosition2[MinimapPosition2["Gutter"] = 2] = "Gutter"; -})(MinimapPosition$1 || (MinimapPosition$1 = {})); -var MouseTargetType; -(function(MouseTargetType2) { - MouseTargetType2[MouseTargetType2["UNKNOWN"] = 0] = "UNKNOWN"; - MouseTargetType2[MouseTargetType2["TEXTAREA"] = 1] = "TEXTAREA"; - MouseTargetType2[MouseTargetType2["GUTTER_GLYPH_MARGIN"] = 2] = "GUTTER_GLYPH_MARGIN"; - MouseTargetType2[MouseTargetType2["GUTTER_LINE_NUMBERS"] = 3] = "GUTTER_LINE_NUMBERS"; - MouseTargetType2[MouseTargetType2["GUTTER_LINE_DECORATIONS"] = 4] = "GUTTER_LINE_DECORATIONS"; - MouseTargetType2[MouseTargetType2["GUTTER_VIEW_ZONE"] = 5] = "GUTTER_VIEW_ZONE"; - MouseTargetType2[MouseTargetType2["CONTENT_TEXT"] = 6] = "CONTENT_TEXT"; - MouseTargetType2[MouseTargetType2["CONTENT_EMPTY"] = 7] = "CONTENT_EMPTY"; - MouseTargetType2[MouseTargetType2["CONTENT_VIEW_ZONE"] = 8] = "CONTENT_VIEW_ZONE"; - MouseTargetType2[MouseTargetType2["CONTENT_WIDGET"] = 9] = "CONTENT_WIDGET"; - MouseTargetType2[MouseTargetType2["OVERVIEW_RULER"] = 10] = "OVERVIEW_RULER"; - MouseTargetType2[MouseTargetType2["SCROLLBAR"] = 11] = "SCROLLBAR"; - MouseTargetType2[MouseTargetType2["OVERLAY_WIDGET"] = 12] = "OVERLAY_WIDGET"; - MouseTargetType2[MouseTargetType2["OUTSIDE_EDITOR"] = 13] = "OUTSIDE_EDITOR"; -})(MouseTargetType || (MouseTargetType = {})); -var OverlayWidgetPositionPreference; -(function(OverlayWidgetPositionPreference2) { - OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_RIGHT_CORNER"] = 0] = "TOP_RIGHT_CORNER"; - OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["BOTTOM_RIGHT_CORNER"] = 1] = "BOTTOM_RIGHT_CORNER"; - OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_CENTER"] = 2] = "TOP_CENTER"; -})(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {})); -var OverviewRulerLane$1; -(function(OverviewRulerLane2) { - OverviewRulerLane2[OverviewRulerLane2["Left"] = 1] = "Left"; - OverviewRulerLane2[OverviewRulerLane2["Center"] = 2] = "Center"; - OverviewRulerLane2[OverviewRulerLane2["Right"] = 4] = "Right"; - OverviewRulerLane2[OverviewRulerLane2["Full"] = 7] = "Full"; -})(OverviewRulerLane$1 || (OverviewRulerLane$1 = {})); -var PositionAffinity; -(function(PositionAffinity2) { - PositionAffinity2[PositionAffinity2["Left"] = 0] = "Left"; - PositionAffinity2[PositionAffinity2["Right"] = 1] = "Right"; - PositionAffinity2[PositionAffinity2["None"] = 2] = "None"; -})(PositionAffinity || (PositionAffinity = {})); -var RenderLineNumbersType; -(function(RenderLineNumbersType2) { - RenderLineNumbersType2[RenderLineNumbersType2["Off"] = 0] = "Off"; - RenderLineNumbersType2[RenderLineNumbersType2["On"] = 1] = "On"; - RenderLineNumbersType2[RenderLineNumbersType2["Relative"] = 2] = "Relative"; - RenderLineNumbersType2[RenderLineNumbersType2["Interval"] = 3] = "Interval"; - RenderLineNumbersType2[RenderLineNumbersType2["Custom"] = 4] = "Custom"; -})(RenderLineNumbersType || (RenderLineNumbersType = {})); -var RenderMinimap; -(function(RenderMinimap2) { - RenderMinimap2[RenderMinimap2["None"] = 0] = "None"; - RenderMinimap2[RenderMinimap2["Text"] = 1] = "Text"; - RenderMinimap2[RenderMinimap2["Blocks"] = 2] = "Blocks"; -})(RenderMinimap || (RenderMinimap = {})); -var ScrollType; -(function(ScrollType2) { - ScrollType2[ScrollType2["Smooth"] = 0] = "Smooth"; - ScrollType2[ScrollType2["Immediate"] = 1] = "Immediate"; -})(ScrollType || (ScrollType = {})); -var ScrollbarVisibility; -(function(ScrollbarVisibility2) { - ScrollbarVisibility2[ScrollbarVisibility2["Auto"] = 1] = "Auto"; - ScrollbarVisibility2[ScrollbarVisibility2["Hidden"] = 2] = "Hidden"; - ScrollbarVisibility2[ScrollbarVisibility2["Visible"] = 3] = "Visible"; -})(ScrollbarVisibility || (ScrollbarVisibility = {})); -var SelectionDirection; -(function(SelectionDirection2) { - SelectionDirection2[SelectionDirection2["LTR"] = 0] = "LTR"; - SelectionDirection2[SelectionDirection2["RTL"] = 1] = "RTL"; -})(SelectionDirection || (SelectionDirection = {})); -var SignatureHelpTriggerKind; -(function(SignatureHelpTriggerKind2) { - SignatureHelpTriggerKind2[SignatureHelpTriggerKind2["Invoke"] = 1] = "Invoke"; - SignatureHelpTriggerKind2[SignatureHelpTriggerKind2["TriggerCharacter"] = 2] = "TriggerCharacter"; - SignatureHelpTriggerKind2[SignatureHelpTriggerKind2["ContentChange"] = 3] = "ContentChange"; -})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {})); -var SymbolKind$1; -(function(SymbolKind2) { - SymbolKind2[SymbolKind2["File"] = 0] = "File"; - SymbolKind2[SymbolKind2["Module"] = 1] = "Module"; - SymbolKind2[SymbolKind2["Namespace"] = 2] = "Namespace"; - SymbolKind2[SymbolKind2["Package"] = 3] = "Package"; - SymbolKind2[SymbolKind2["Class"] = 4] = "Class"; - SymbolKind2[SymbolKind2["Method"] = 5] = "Method"; - SymbolKind2[SymbolKind2["Property"] = 6] = "Property"; - SymbolKind2[SymbolKind2["Field"] = 7] = "Field"; - SymbolKind2[SymbolKind2["Constructor"] = 8] = "Constructor"; - SymbolKind2[SymbolKind2["Enum"] = 9] = "Enum"; - SymbolKind2[SymbolKind2["Interface"] = 10] = "Interface"; - SymbolKind2[SymbolKind2["Function"] = 11] = "Function"; - SymbolKind2[SymbolKind2["Variable"] = 12] = "Variable"; - SymbolKind2[SymbolKind2["Constant"] = 13] = "Constant"; - SymbolKind2[SymbolKind2["String"] = 14] = "String"; - SymbolKind2[SymbolKind2["Number"] = 15] = "Number"; - SymbolKind2[SymbolKind2["Boolean"] = 16] = "Boolean"; - SymbolKind2[SymbolKind2["Array"] = 17] = "Array"; - SymbolKind2[SymbolKind2["Object"] = 18] = "Object"; - SymbolKind2[SymbolKind2["Key"] = 19] = "Key"; - SymbolKind2[SymbolKind2["Null"] = 20] = "Null"; - SymbolKind2[SymbolKind2["EnumMember"] = 21] = "EnumMember"; - SymbolKind2[SymbolKind2["Struct"] = 22] = "Struct"; - SymbolKind2[SymbolKind2["Event"] = 23] = "Event"; - SymbolKind2[SymbolKind2["Operator"] = 24] = "Operator"; - SymbolKind2[SymbolKind2["TypeParameter"] = 25] = "TypeParameter"; -})(SymbolKind$1 || (SymbolKind$1 = {})); -var SymbolTag$1; -(function(SymbolTag2) { - SymbolTag2[SymbolTag2["Deprecated"] = 1] = "Deprecated"; -})(SymbolTag$1 || (SymbolTag$1 = {})); -var TextEditorCursorBlinkingStyle; -(function(TextEditorCursorBlinkingStyle2) { - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Hidden"] = 0] = "Hidden"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Blink"] = 1] = "Blink"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Smooth"] = 2] = "Smooth"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Phase"] = 3] = "Phase"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Expand"] = 4] = "Expand"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Solid"] = 5] = "Solid"; -})(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {})); -var TextEditorCursorStyle; -(function(TextEditorCursorStyle2) { - TextEditorCursorStyle2[TextEditorCursorStyle2["Line"] = 1] = "Line"; - TextEditorCursorStyle2[TextEditorCursorStyle2["Block"] = 2] = "Block"; - TextEditorCursorStyle2[TextEditorCursorStyle2["Underline"] = 3] = "Underline"; - TextEditorCursorStyle2[TextEditorCursorStyle2["LineThin"] = 4] = "LineThin"; - TextEditorCursorStyle2[TextEditorCursorStyle2["BlockOutline"] = 5] = "BlockOutline"; - TextEditorCursorStyle2[TextEditorCursorStyle2["UnderlineThin"] = 6] = "UnderlineThin"; -})(TextEditorCursorStyle || (TextEditorCursorStyle = {})); -var TrackedRangeStickiness; -(function(TrackedRangeStickiness2) { - TrackedRangeStickiness2[TrackedRangeStickiness2["AlwaysGrowsWhenTypingAtEdges"] = 0] = "AlwaysGrowsWhenTypingAtEdges"; - TrackedRangeStickiness2[TrackedRangeStickiness2["NeverGrowsWhenTypingAtEdges"] = 1] = "NeverGrowsWhenTypingAtEdges"; - TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingBefore"] = 2] = "GrowsOnlyWhenTypingBefore"; - TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingAfter"] = 3] = "GrowsOnlyWhenTypingAfter"; -})(TrackedRangeStickiness || (TrackedRangeStickiness = {})); -var WrappingIndent; -(function(WrappingIndent2) { - WrappingIndent2[WrappingIndent2["None"] = 0] = "None"; - WrappingIndent2[WrappingIndent2["Same"] = 1] = "Same"; - WrappingIndent2[WrappingIndent2["Indent"] = 2] = "Indent"; - WrappingIndent2[WrappingIndent2["DeepIndent"] = 3] = "DeepIndent"; -})(WrappingIndent || (WrappingIndent = {})); -class KeyMod { - static chord(firstPart, secondPart) { - return KeyChord(firstPart, secondPart); + e.is = t; +})(Oi || (Oi = {})); +var Vi; +(function(e) { + e[e.Type = 1] = "Type", e[e.Parameter = 2] = "Parameter"; +})(Vi || (Vi = {})); +new nc(); +var Ui; +(function(e) { + e[e.Unknown = 0] = "Unknown", e[e.Disabled = 1] = "Disabled", e[e.Enabled = 2] = "Enabled"; +})(Ui || (Ui = {})); +var Bi; +(function(e) { + e[e.KeepWhitespace = 1] = "KeepWhitespace", e[e.InsertAsSnippet = 4] = "InsertAsSnippet"; +})(Bi || (Bi = {})); +var ji; +(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"; +})(ji || (ji = {})); +var qi; +(function(e) { + e[e.Deprecated = 1] = "Deprecated"; +})(qi || (qi = {})); +var $i; +(function(e) { + e[e.Invoke = 0] = "Invoke", e[e.TriggerCharacter = 1] = "TriggerCharacter", e[e.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"; +})($i || ($i = {})); +var Hi; +(function(e) { + e[e.EXACT = 0] = "EXACT", e[e.ABOVE = 1] = "ABOVE", e[e.BELOW = 2] = "BELOW"; +})(Hi || (Hi = {})); +var Gi; +(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"; +})(Gi || (Gi = {})); +var Ji; +(function(e) { + e[e.LF = 1] = "LF", e[e.CRLF = 2] = "CRLF"; +})(Ji || (Ji = {})); +var Xi; +(function(e) { + e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"; +})(Xi || (Xi = {})); +var Yi; +(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"; +})(Yi || (Yi = {})); +var Ki; +(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.autoClosingBrackets = 5] = "autoClosingBrackets", e[e.autoClosingDelete = 6] = "autoClosingDelete", e[e.autoClosingOvertype = 7] = "autoClosingOvertype", e[e.autoClosingQuotes = 8] = "autoClosingQuotes", e[e.autoIndent = 9] = "autoIndent", e[e.automaticLayout = 10] = "automaticLayout", e[e.autoSurround = 11] = "autoSurround", e[e.bracketPairColorization = 12] = "bracketPairColorization", e[e.guides = 13] = "guides", e[e.codeLens = 14] = "codeLens", e[e.codeLensFontFamily = 15] = "codeLensFontFamily", e[e.codeLensFontSize = 16] = "codeLensFontSize", e[e.colorDecorators = 17] = "colorDecorators", e[e.columnSelection = 18] = "columnSelection", e[e.comments = 19] = "comments", e[e.contextmenu = 20] = "contextmenu", e[e.copyWithSyntaxHighlighting = 21] = "copyWithSyntaxHighlighting", e[e.cursorBlinking = 22] = "cursorBlinking", e[e.cursorSmoothCaretAnimation = 23] = "cursorSmoothCaretAnimation", e[e.cursorStyle = 24] = "cursorStyle", e[e.cursorSurroundingLines = 25] = "cursorSurroundingLines", e[e.cursorSurroundingLinesStyle = 26] = "cursorSurroundingLinesStyle", e[e.cursorWidth = 27] = "cursorWidth", e[e.disableLayerHinting = 28] = "disableLayerHinting", e[e.disableMonospaceOptimizations = 29] = "disableMonospaceOptimizations", e[e.domReadOnly = 30] = "domReadOnly", e[e.dragAndDrop = 31] = "dragAndDrop", e[e.emptySelectionClipboard = 32] = "emptySelectionClipboard", e[e.extraEditorClassName = 33] = "extraEditorClassName", e[e.fastScrollSensitivity = 34] = "fastScrollSensitivity", e[e.find = 35] = "find", e[e.fixedOverflowWidgets = 36] = "fixedOverflowWidgets", e[e.folding = 37] = "folding", e[e.foldingStrategy = 38] = "foldingStrategy", e[e.foldingHighlight = 39] = "foldingHighlight", e[e.foldingImportsByDefault = 40] = "foldingImportsByDefault", e[e.foldingMaximumRegions = 41] = "foldingMaximumRegions", e[e.unfoldOnClickAfterEndOfLine = 42] = "unfoldOnClickAfterEndOfLine", e[e.fontFamily = 43] = "fontFamily", e[e.fontInfo = 44] = "fontInfo", e[e.fontLigatures = 45] = "fontLigatures", e[e.fontSize = 46] = "fontSize", e[e.fontWeight = 47] = "fontWeight", e[e.formatOnPaste = 48] = "formatOnPaste", e[e.formatOnType = 49] = "formatOnType", e[e.glyphMargin = 50] = "glyphMargin", e[e.gotoLocation = 51] = "gotoLocation", e[e.hideCursorInOverviewRuler = 52] = "hideCursorInOverviewRuler", e[e.hover = 53] = "hover", e[e.inDiffEditor = 54] = "inDiffEditor", e[e.inlineSuggest = 55] = "inlineSuggest", e[e.letterSpacing = 56] = "letterSpacing", e[e.lightbulb = 57] = "lightbulb", e[e.lineDecorationsWidth = 58] = "lineDecorationsWidth", e[e.lineHeight = 59] = "lineHeight", e[e.lineNumbers = 60] = "lineNumbers", e[e.lineNumbersMinChars = 61] = "lineNumbersMinChars", e[e.linkedEditing = 62] = "linkedEditing", e[e.links = 63] = "links", e[e.matchBrackets = 64] = "matchBrackets", e[e.minimap = 65] = "minimap", e[e.mouseStyle = 66] = "mouseStyle", e[e.mouseWheelScrollSensitivity = 67] = "mouseWheelScrollSensitivity", e[e.mouseWheelZoom = 68] = "mouseWheelZoom", e[e.multiCursorMergeOverlapping = 69] = "multiCursorMergeOverlapping", e[e.multiCursorModifier = 70] = "multiCursorModifier", e[e.multiCursorPaste = 71] = "multiCursorPaste", e[e.occurrencesHighlight = 72] = "occurrencesHighlight", e[e.overviewRulerBorder = 73] = "overviewRulerBorder", e[e.overviewRulerLanes = 74] = "overviewRulerLanes", e[e.padding = 75] = "padding", e[e.parameterHints = 76] = "parameterHints", e[e.peekWidgetDefaultFocus = 77] = "peekWidgetDefaultFocus", e[e.definitionLinkOpensInPeek = 78] = "definitionLinkOpensInPeek", e[e.quickSuggestions = 79] = "quickSuggestions", e[e.quickSuggestionsDelay = 80] = "quickSuggestionsDelay", e[e.readOnly = 81] = "readOnly", e[e.renameOnType = 82] = "renameOnType", e[e.renderControlCharacters = 83] = "renderControlCharacters", e[e.renderFinalNewline = 84] = "renderFinalNewline", e[e.renderLineHighlight = 85] = "renderLineHighlight", e[e.renderLineHighlightOnlyWhenFocus = 86] = "renderLineHighlightOnlyWhenFocus", e[e.renderValidationDecorations = 87] = "renderValidationDecorations", e[e.renderWhitespace = 88] = "renderWhitespace", e[e.revealHorizontalRightPadding = 89] = "revealHorizontalRightPadding", e[e.roundedSelection = 90] = "roundedSelection", e[e.rulers = 91] = "rulers", e[e.scrollbar = 92] = "scrollbar", e[e.scrollBeyondLastColumn = 93] = "scrollBeyondLastColumn", e[e.scrollBeyondLastLine = 94] = "scrollBeyondLastLine", e[e.scrollPredominantAxis = 95] = "scrollPredominantAxis", e[e.selectionClipboard = 96] = "selectionClipboard", e[e.selectionHighlight = 97] = "selectionHighlight", e[e.selectOnLineNumbers = 98] = "selectOnLineNumbers", e[e.showFoldingControls = 99] = "showFoldingControls", e[e.showUnused = 100] = "showUnused", e[e.snippetSuggestions = 101] = "snippetSuggestions", e[e.smartSelect = 102] = "smartSelect", e[e.smoothScrolling = 103] = "smoothScrolling", e[e.stickyTabStops = 104] = "stickyTabStops", e[e.stopRenderingLineAfter = 105] = "stopRenderingLineAfter", e[e.suggest = 106] = "suggest", e[e.suggestFontSize = 107] = "suggestFontSize", e[e.suggestLineHeight = 108] = "suggestLineHeight", e[e.suggestOnTriggerCharacters = 109] = "suggestOnTriggerCharacters", e[e.suggestSelection = 110] = "suggestSelection", e[e.tabCompletion = 111] = "tabCompletion", e[e.tabIndex = 112] = "tabIndex", e[e.unicodeHighlighting = 113] = "unicodeHighlighting", e[e.unusualLineTerminators = 114] = "unusualLineTerminators", e[e.useShadowDOM = 115] = "useShadowDOM", e[e.useTabStops = 116] = "useTabStops", e[e.wordSeparators = 117] = "wordSeparators", e[e.wordWrap = 118] = "wordWrap", e[e.wordWrapBreakAfterCharacters = 119] = "wordWrapBreakAfterCharacters", e[e.wordWrapBreakBeforeCharacters = 120] = "wordWrapBreakBeforeCharacters", e[e.wordWrapColumn = 121] = "wordWrapColumn", e[e.wordWrapOverride1 = 122] = "wordWrapOverride1", e[e.wordWrapOverride2 = 123] = "wordWrapOverride2", e[e.wrappingIndent = 124] = "wrappingIndent", e[e.wrappingStrategy = 125] = "wrappingStrategy", e[e.showDeprecated = 126] = "showDeprecated", e[e.inlayHints = 127] = "inlayHints", e[e.editorClassName = 128] = "editorClassName", e[e.pixelRatio = 129] = "pixelRatio", e[e.tabFocusMode = 130] = "tabFocusMode", e[e.layoutInfo = 131] = "layoutInfo", e[e.wrappingInfo = 132] = "wrappingInfo"; +})(Ki || (Ki = {})); +var Zi; +(function(e) { + e[e.TextDefined = 0] = "TextDefined", e[e.LF = 1] = "LF", e[e.CRLF = 2] = "CRLF"; +})(Zi || (Zi = {})); +var Qi; +(function(e) { + e[e.LF = 0] = "LF", e[e.CRLF = 1] = "CRLF"; +})(Qi || (Qi = {})); +var ea; +(function(e) { + e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent"; +})(ea || (ea = {})); +var ta; +(function(e) { + e[e.Both = 0] = "Both", e[e.Right = 1] = "Right", e[e.Left = 2] = "Left", e[e.None = 3] = "None"; +})(ta || (ta = {})); +var na; +(function(e) { + e[e.Type = 1] = "Type", e[e.Parameter = 2] = "Parameter"; +})(na || (na = {})); +var ra; +(function(e) { + e[e.Automatic = 0] = "Automatic", e[e.Explicit = 1] = "Explicit"; +})(ra || (ra = {})); +var kr; +(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.NumLock = 78] = "NumLock", e[e.ScrollLock = 79] = "ScrollLock", e[e.Semicolon = 80] = "Semicolon", e[e.Equal = 81] = "Equal", e[e.Comma = 82] = "Comma", e[e.Minus = 83] = "Minus", e[e.Period = 84] = "Period", e[e.Slash = 85] = "Slash", e[e.Backquote = 86] = "Backquote", e[e.BracketLeft = 87] = "BracketLeft", e[e.Backslash = 88] = "Backslash", e[e.BracketRight = 89] = "BracketRight", e[e.Quote = 90] = "Quote", e[e.OEM_8 = 91] = "OEM_8", e[e.IntlBackslash = 92] = "IntlBackslash", e[e.Numpad0 = 93] = "Numpad0", e[e.Numpad1 = 94] = "Numpad1", e[e.Numpad2 = 95] = "Numpad2", e[e.Numpad3 = 96] = "Numpad3", e[e.Numpad4 = 97] = "Numpad4", e[e.Numpad5 = 98] = "Numpad5", e[e.Numpad6 = 99] = "Numpad6", e[e.Numpad7 = 100] = "Numpad7", e[e.Numpad8 = 101] = "Numpad8", e[e.Numpad9 = 102] = "Numpad9", e[e.NumpadMultiply = 103] = "NumpadMultiply", e[e.NumpadAdd = 104] = "NumpadAdd", e[e.NUMPAD_SEPARATOR = 105] = "NUMPAD_SEPARATOR", e[e.NumpadSubtract = 106] = "NumpadSubtract", e[e.NumpadDecimal = 107] = "NumpadDecimal", e[e.NumpadDivide = 108] = "NumpadDivide", e[e.KEY_IN_COMPOSITION = 109] = "KEY_IN_COMPOSITION", e[e.ABNT_C1 = 110] = "ABNT_C1", e[e.ABNT_C2 = 111] = "ABNT_C2", e[e.AudioVolumeMute = 112] = "AudioVolumeMute", e[e.AudioVolumeUp = 113] = "AudioVolumeUp", e[e.AudioVolumeDown = 114] = "AudioVolumeDown", e[e.BrowserSearch = 115] = "BrowserSearch", e[e.BrowserHome = 116] = "BrowserHome", e[e.BrowserBack = 117] = "BrowserBack", e[e.BrowserForward = 118] = "BrowserForward", e[e.MediaTrackNext = 119] = "MediaTrackNext", e[e.MediaTrackPrevious = 120] = "MediaTrackPrevious", e[e.MediaStop = 121] = "MediaStop", e[e.MediaPlayPause = 122] = "MediaPlayPause", e[e.LaunchMediaPlayer = 123] = "LaunchMediaPlayer", e[e.LaunchMail = 124] = "LaunchMail", e[e.LaunchApp2 = 125] = "LaunchApp2", e[e.Clear = 126] = "Clear", e[e.MAX_VALUE = 127] = "MAX_VALUE"; +})(kr || (kr = {})); +var Fr; +(function(e) { + e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error"; +})(Fr || (Fr = {})); +var _r; +(function(e) { + e[e.Unnecessary = 1] = "Unnecessary", e[e.Deprecated = 2] = "Deprecated"; +})(_r || (_r = {})); +var ia; +(function(e) { + e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"; +})(ia || (ia = {})); +var aa; +(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"; +})(aa || (aa = {})); +var sa; +(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"; +})(sa || (sa = {})); +var oa; +(function(e) { + e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"; +})(oa || (oa = {})); +var la; +(function(e) { + e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e[e.None = 2] = "None"; +})(la || (la = {})); +var ca; +(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"; +})(ca || (ca = {})); +var ha; +(function(e) { + e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Blocks = 2] = "Blocks"; +})(ha || (ha = {})); +var da; +(function(e) { + e[e.Smooth = 0] = "Smooth", e[e.Immediate = 1] = "Immediate"; +})(da || (da = {})); +var ua; +(function(e) { + e[e.Auto = 1] = "Auto", e[e.Hidden = 2] = "Hidden", e[e.Visible = 3] = "Visible"; +})(ua || (ua = {})); +var Dr; +(function(e) { + e[e.LTR = 0] = "LTR", e[e.RTL = 1] = "RTL"; +})(Dr || (Dr = {})); +var pa; +(function(e) { + e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"; +})(pa || (pa = {})); +var fa; +(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"; +})(fa || (fa = {})); +var ma; +(function(e) { + e[e.Deprecated = 1] = "Deprecated"; +})(ma || (ma = {})); +var ga; +(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"; +})(ga || (ga = {})); +var ba; +(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"; +})(ba || (ba = {})); +var va; +(function(e) { + e[e.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", e[e.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", e[e.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore", e[e.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"; +})(va || (va = {})); +var ya; +(function(e) { + e[e.None = 0] = "None", e[e.Same = 1] = "Same", e[e.Indent = 2] = "Indent", e[e.DeepIndent = 3] = "DeepIndent"; +})(ya || (ya = {})); +class Qt { + static chord(t, n) { + return tc(t, n); } } -KeyMod.CtrlCmd = 2048; -KeyMod.Shift = 1024; -KeyMod.Alt = 512; -KeyMod.WinCtrl = 256; -function createMonacoBaseAPI() { +Qt.CtrlCmd = 2048; +Qt.Shift = 1024; +Qt.Alt = 512; +Qt.WinCtrl = 256; +function ac() { return { editor: void 0, languages: void 0, - CancellationTokenSource, - Emitter, - KeyCode, - KeyMod, - Position: Position$1, - Range: Range$1, - Selection, - SelectionDirection, - MarkerSeverity, - MarkerTag, - Uri: URI$1, - Token + CancellationTokenSource: Kl, + Emitter: He, + KeyCode: kr, + KeyMod: Qt, + Position: we, + Range: te, + Selection: Ce, + SelectionDirection: Dr, + MarkerSeverity: Fr, + MarkerTag: _r, + Uri: ct, + Token: ic }; } -var OverviewRulerLane; -(function(OverviewRulerLane2) { - OverviewRulerLane2[OverviewRulerLane2["Left"] = 1] = "Left"; - OverviewRulerLane2[OverviewRulerLane2["Center"] = 2] = "Center"; - OverviewRulerLane2[OverviewRulerLane2["Right"] = 4] = "Right"; - OverviewRulerLane2[OverviewRulerLane2["Full"] = 7] = "Full"; -})(OverviewRulerLane || (OverviewRulerLane = {})); -var MinimapPosition; -(function(MinimapPosition2) { - MinimapPosition2[MinimapPosition2["Inline"] = 1] = "Inline"; - MinimapPosition2[MinimapPosition2["Gutter"] = 2] = "Gutter"; -})(MinimapPosition || (MinimapPosition = {})); -var InjectedTextCursorStops; -(function(InjectedTextCursorStops2) { - InjectedTextCursorStops2[InjectedTextCursorStops2["Both"] = 0] = "Both"; - InjectedTextCursorStops2[InjectedTextCursorStops2["Right"] = 1] = "Right"; - InjectedTextCursorStops2[InjectedTextCursorStops2["Left"] = 2] = "Left"; - InjectedTextCursorStops2[InjectedTextCursorStops2["None"] = 3] = "None"; -})(InjectedTextCursorStops || (InjectedTextCursorStops = {})); -function leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) { - if (matchStartIndex === 0) { - return true; +var wa; +(function(e) { + e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"; +})(wa || (wa = {})); +var xa; +(function(e) { + e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"; +})(xa || (xa = {})); +var Sa; +(function(e) { + e[e.Both = 0] = "Both", e[e.Right = 1] = "Right", e[e.Left = 2] = "Left", e[e.None = 3] = "None"; +})(Sa || (Sa = {})); +function sc(e, t, n, r, i) { + if (r === 0) + return !0; + const a = t.charCodeAt(r - 1); + if (e.get(a) !== 0 || a === 13 || a === 10) + return !0; + if (i > 0) { + const o = t.charCodeAt(r); + if (e.get(o) !== 0) + return !0; } - const charBefore = text.charCodeAt(matchStartIndex - 1); - if (wordSeparators.get(charBefore) !== 0) { - return true; - } - if (charBefore === 13 || charBefore === 10) { - return true; - } - if (matchLength > 0) { - const firstCharInMatch = text.charCodeAt(matchStartIndex); - if (wordSeparators.get(firstCharInMatch) !== 0) { - return true; - } - } - return false; + return !1; } -function rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) { - if (matchStartIndex + matchLength === textLength) { - return true; +function oc(e, t, n, r, i) { + if (r + i === n) + return !0; + const a = t.charCodeAt(r + i); + if (e.get(a) !== 0 || a === 13 || a === 10) + return !0; + if (i > 0) { + const o = t.charCodeAt(r + i - 1); + if (e.get(o) !== 0) + return !0; } - const charAfter = text.charCodeAt(matchStartIndex + matchLength); - if (wordSeparators.get(charAfter) !== 0) { - return true; - } - if (charAfter === 13 || charAfter === 10) { - return true; - } - if (matchLength > 0) { - const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1); - if (wordSeparators.get(lastCharInMatch) !== 0) { - return true; - } - } - return false; + return !1; } -function isValidMatch(wordSeparators, text, textLength, matchStartIndex, matchLength) { - return leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength); +function lc(e, t, n, r, i) { + return sc(e, t, n, r, i) && oc(e, t, n, r, i); } -class Searcher { - constructor(wordSeparators, searchRegex) { - this._wordSeparators = wordSeparators; - this._searchRegex = searchRegex; - this._prevMatchStartIndex = -1; - this._prevMatchLength = 0; +class cc { + constructor(t, n) { + this._wordSeparators = t, this._searchRegex = n, this._prevMatchStartIndex = -1, this._prevMatchLength = 0; } - reset(lastIndex) { - this._searchRegex.lastIndex = lastIndex; - this._prevMatchStartIndex = -1; - this._prevMatchLength = 0; + reset(t) { + this._searchRegex.lastIndex = t, this._prevMatchStartIndex = -1, this._prevMatchLength = 0; } - next(text) { - const textLength = text.length; - let m; + next(t) { + const n = t.length; + let r; do { - if (this._prevMatchStartIndex + this._prevMatchLength === textLength) { + if (this._prevMatchStartIndex + this._prevMatchLength === n || (r = this._searchRegex.exec(t), !r)) return null; - } - m = this._searchRegex.exec(text); - if (!m) { - return null; - } - const matchStartIndex = m.index; - const matchLength = m[0].length; - if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { - if (matchLength === 0) { - if (getNextCodePoint(text, textLength, this._searchRegex.lastIndex) > 65535) { - this._searchRegex.lastIndex += 2; - } else { - this._searchRegex.lastIndex += 1; - } + const i = r.index, a = r[0].length; + if (i === this._prevMatchStartIndex && a === this._prevMatchLength) { + if (a === 0) { + ll(t, n, this._searchRegex.lastIndex) > 65535 ? this._searchRegex.lastIndex += 2 : this._searchRegex.lastIndex += 1; continue; } return null; } - this._prevMatchStartIndex = matchStartIndex; - this._prevMatchLength = matchLength; - if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) { - return m; - } - } while (m); + if (this._prevMatchStartIndex = i, this._prevMatchLength = a, !this._wordSeparators || lc(this._wordSeparators, t, n, i, a)) + return r; + } while (r); return null; } } -class UnicodeTextModelHighlighter { - static computeUnicodeHighlights(model, options, range) { - const startLine = range ? range.startLineNumber : 1; - const endLine = range ? range.endLineNumber : model.getLineCount(); - const codePointHighlighter = new CodePointHighlighter(options); - const candidates = codePointHighlighter.getCandidateCodePoints(); - let regex; - if (candidates === "allNonBasicAscii") { - regex = new RegExp("[^\\t\\n\\r\\x20-\\x7E]", "g"); - } else { - regex = new RegExp(`${buildRegExpCharClassExpr(Array.from(candidates))}`, "g"); - } - const searcher = new Searcher(null, regex); - const ranges = []; - let hasMore = false; - let m; - let ambiguousCharacterCount = 0; - let invisibleCharacterCount = 0; - let nonBasicAsciiCharacterCount = 0; - forLoop: - for (let lineNumber = startLine, lineCount = endLine; lineNumber <= lineCount; lineNumber++) { - const lineContent = model.getLineContent(lineNumber); - const lineLength = lineContent.length; - searcher.reset(0); - do { - m = searcher.next(lineContent); - if (m) { - let startIndex = m.index; - let endIndex = m.index + m[0].length; - if (startIndex > 0) { - const charCodeBefore = lineContent.charCodeAt(startIndex - 1); - if (isHighSurrogate(charCodeBefore)) { - startIndex--; - } +class hc { + static computeUnicodeHighlights(t, n, r) { + const i = r ? r.startLineNumber : 1, a = r ? r.endLineNumber : t.getLineCount(), o = new Ca(n), l = o.getCandidateCodePoints(); + let h; + l === "allNonBasicAscii" ? h = new RegExp("[^\\t\\n\\r\\x20-\\x7E]", "g") : h = new RegExp(`${dc(Array.from(l))}`, "g"); + const c = new cc(null, h), d = []; + let p = !1, f, g = 0, w = 0, b = 0; + e: + for (let y = i, A = a; y <= A; y++) { + const C = t.getLineContent(y), R = C.length; + c.reset(0); + do + if (f = c.next(C), f) { + let k = f.index, F = f.index + f[0].length; + if (k > 0) { + const T = C.charCodeAt(k - 1); + pr(T) && k--; } - if (endIndex + 1 < lineLength) { - const charCodeBefore = lineContent.charCodeAt(endIndex - 1); - if (isHighSurrogate(charCodeBefore)) { - endIndex++; - } + if (F + 1 < R) { + const T = C.charCodeAt(F - 1); + pr(T) && F++; } - const str = lineContent.substring(startIndex, endIndex); - const word = getWordAtText(startIndex + 1, DEFAULT_WORD_REGEXP, lineContent, 0); - const highlightReason = codePointHighlighter.shouldHighlightNonBasicASCII(str, word ? word.word : null); - if (highlightReason !== 0) { - if (highlightReason === 3) { - ambiguousCharacterCount++; - } else if (highlightReason === 2) { - invisibleCharacterCount++; - } else if (highlightReason === 1) { - nonBasicAsciiCharacterCount++; - } else { - assertNever(); + const P = C.substring(k, F), N = Kr(k + 1, no, C, 0), z = o.shouldHighlightNonBasicASCII(P, N ? N.word : null); + if (z !== 0) { + z === 3 ? g++ : z === 2 ? w++ : z === 1 ? b++ : el(); + const T = 1e3; + if (d.length >= T) { + p = !0; + break e; } - const MAX_RESULT_LENGTH = 1e3; - if (ranges.length >= MAX_RESULT_LENGTH) { - hasMore = true; - break forLoop; - } - ranges.push(new Range$1(lineNumber, startIndex + 1, lineNumber, endIndex + 1)); + d.push(new te(y, k + 1, y, F + 1)); } } - } while (m); + while (f); } return { - ranges, - hasMore, - ambiguousCharacterCount, - invisibleCharacterCount, - nonBasicAsciiCharacterCount + ranges: d, + hasMore: p, + ambiguousCharacterCount: g, + invisibleCharacterCount: w, + nonBasicAsciiCharacterCount: b }; } - static computeUnicodeHighlightReason(char, options) { - const codePointHighlighter = new CodePointHighlighter(options); - const reason = codePointHighlighter.shouldHighlightNonBasicASCII(char, null); - switch (reason) { + static computeUnicodeHighlightReason(t, n) { + const r = new Ca(n); + switch (r.shouldHighlightNonBasicASCII(t, null)) { case 0: return null; case 2: return { kind: 1 }; case 3: { - const codePoint = char.codePointAt(0); - const primaryConfusable = codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint); - const notAmbiguousInLocales = AmbiguousCharacters.getLocales().filter((l) => !AmbiguousCharacters.getInstance(/* @__PURE__ */ new Set([...options.allowedLocales, l])).isAmbiguous(codePoint)); - return { kind: 0, confusableWith: String.fromCodePoint(primaryConfusable), notAmbiguousInLocales }; + const a = t.codePointAt(0), o = r.ambiguousCharacters.getPrimaryConfusable(a), l = ze.getLocales().filter((h) => !ze.getInstance(/* @__PURE__ */ new Set([...n.allowedLocales, h])).isAmbiguous(a)); + return { kind: 0, confusableWith: String.fromCodePoint(o), notAmbiguousInLocales: l }; } case 1: return { kind: 2 }; } } } -function buildRegExpCharClassExpr(codePoints, flags) { - const src = `[${escapeRegExpCharacters(codePoints.map((i) => String.fromCodePoint(i)).join(""))}]`; - return src; +function dc(e, t) { + return `[${nl(e.map((r) => String.fromCodePoint(r)).join(""))}]`; } -class CodePointHighlighter { - constructor(options) { - this.options = options; - this.allowedCodePoints = new Set(options.allowedCodePoints); - this.ambiguousCharacters = AmbiguousCharacters.getInstance(new Set(options.allowedLocales)); +class Ca { + constructor(t) { + this.options = t, this.allowedCodePoints = new Set(t.allowedCodePoints), this.ambiguousCharacters = ze.getInstance(new Set(t.allowedLocales)); } getCandidateCodePoints() { - if (this.options.nonBasicASCII) { + if (this.options.nonBasicASCII) return "allNonBasicAscii"; - } - const set = /* @__PURE__ */ new Set(); - if (this.options.invisibleCharacters) { - for (const cp of InvisibleCharacters.codePoints) { - if (!isAllowedInvisibleCharacter(String.fromCodePoint(cp))) { - set.add(cp); - } - } - } - if (this.options.ambiguousCharacters) { - for (const cp of this.ambiguousCharacters.getConfusableCodePoints()) { - set.add(cp); - } - } - for (const cp of this.allowedCodePoints) { - set.delete(cp); - } - return set; + const t = /* @__PURE__ */ new Set(); + if (this.options.invisibleCharacters) + for (const n of tt.codePoints) + ka(String.fromCodePoint(n)) || t.add(n); + if (this.options.ambiguousCharacters) + for (const n of this.ambiguousCharacters.getConfusableCodePoints()) + t.add(n); + for (const n of this.allowedCodePoints) + t.delete(n); + return t; } - shouldHighlightNonBasicASCII(character, wordContext) { - const codePoint = character.codePointAt(0); - if (this.allowedCodePoints.has(codePoint)) { + shouldHighlightNonBasicASCII(t, n) { + const r = t.codePointAt(0); + if (this.allowedCodePoints.has(r)) return 0; - } - if (this.options.nonBasicASCII) { + if (this.options.nonBasicASCII) return 1; - } - let hasBasicASCIICharacters = false; - let hasNonConfusableNonBasicAsciiCharacter = false; - if (wordContext) { - for (let char of wordContext) { - const codePoint2 = char.codePointAt(0); - const isBasicASCII$1 = isBasicASCII(char); - hasBasicASCIICharacters = hasBasicASCIICharacters || isBasicASCII$1; - if (!isBasicASCII$1 && !this.ambiguousCharacters.isAmbiguous(codePoint2) && !InvisibleCharacters.isInvisibleCharacter(codePoint2)) { - hasNonConfusableNonBasicAsciiCharacter = true; - } + let i = !1, a = !1; + if (n) + for (let o of n) { + const l = o.codePointAt(0), h = hl(o); + i = i || h, !h && !this.ambiguousCharacters.isAmbiguous(l) && !tt.isInvisibleCharacter(l) && (a = !0); } - } - if (!hasBasicASCIICharacters && hasNonConfusableNonBasicAsciiCharacter) { - return 0; - } - if (this.options.invisibleCharacters) { - if (!isAllowedInvisibleCharacter(character) && InvisibleCharacters.isInvisibleCharacter(codePoint)) { - return 2; - } - } - if (this.options.ambiguousCharacters) { - if (this.ambiguousCharacters.isAmbiguous(codePoint)) { - return 3; - } - } - return 0; + return !i && a ? 0 : this.options.invisibleCharacters && !ka(t) && tt.isInvisibleCharacter(r) ? 2 : this.options.ambiguousCharacters && this.ambiguousCharacters.isAmbiguous(r) ? 3 : 0; } } -function isAllowedInvisibleCharacter(character) { - return character === " " || character === "\n" || character === " "; +function ka(e) { + return e === " " || e === ` +` || e === " "; } -var __awaiter$1 = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); +var it = globalThis && globalThis.__awaiter || function(e, t, n, r) { + function i(a) { + return a instanceof n ? a : new n(function(o) { + o(a); }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { + return new (n || (n = Promise))(function(a, o) { + function l(d) { try { - step(generator.next(value)); - } catch (e) { - reject(e); + c(r.next(d)); + } catch (p) { + o(p); } } - function rejected(value) { + function h(d) { try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + c(r.throw(d)); + } catch (p) { + o(p); } } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + function c(d) { + d.done ? a(d.value) : i(d.value).then(l, h); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + c((r = r.apply(e, t || [])).next()); }); }; -class MirrorModel extends MirrorTextModel { +class uc extends Vl { get uri() { return this._uri; } @@ -7165,418 +4433,283 @@ class MirrorModel extends MirrorTextModel { getLineCount() { return this._lines.length; } - getLineContent(lineNumber) { - return this._lines[lineNumber - 1]; + getLineContent(t) { + return this._lines[t - 1]; } - getWordAtPosition(position, wordDefinition) { - const wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0); - if (wordAtText) { - return new Range$1(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn); - } - return null; + getWordAtPosition(t, n) { + const r = Kr(t.column, jl(n), this._lines[t.lineNumber - 1], 0); + return r ? new te(t.lineNumber, r.startColumn, t.lineNumber, r.endColumn) : null; } - words(wordDefinition) { - const lines = this._lines; - const wordenize = this._wordenize.bind(this); - let lineNumber = 0; - let lineText = ""; - let wordRangesIdx = 0; - let wordRanges = []; + words(t) { + const n = this._lines, r = this._wordenize.bind(this); + let i = 0, a = "", o = 0, l = []; return { *[Symbol.iterator]() { - while (true) { - if (wordRangesIdx < wordRanges.length) { - const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end); - wordRangesIdx += 1; - yield value; - } else { - if (lineNumber < lines.length) { - lineText = lines[lineNumber]; - wordRanges = wordenize(lineText, wordDefinition); - wordRangesIdx = 0; - lineNumber += 1; - } else { - break; - } - } - } + for (; ; ) + if (o < l.length) { + const h = a.substring(l[o].start, l[o].end); + o += 1, yield h; + } else if (i < n.length) + a = n[i], l = r(a, t), o = 0, i += 1; + else + break; } }; } - getLineWords(lineNumber, wordDefinition) { - const content = this._lines[lineNumber - 1]; - const ranges = this._wordenize(content, wordDefinition); - const words = []; - for (const range of ranges) { - words.push({ - word: content.substring(range.start, range.end), - startColumn: range.start + 1, - endColumn: range.end + 1 + getLineWords(t, n) { + const r = this._lines[t - 1], i = this._wordenize(r, n), a = []; + for (const o of i) + a.push({ + word: r.substring(o.start, o.end), + startColumn: o.start + 1, + endColumn: o.end + 1 }); - } - return words; + return a; } - _wordenize(content, wordDefinition) { - const result = []; - let match; - wordDefinition.lastIndex = 0; - while (match = wordDefinition.exec(content)) { - if (match[0].length === 0) { - break; - } - result.push({ start: match.index, end: match.index + match[0].length }); - } - return result; + _wordenize(t, n) { + const r = []; + let i; + for (n.lastIndex = 0; (i = n.exec(t)) && i[0].length !== 0; ) + r.push({ start: i.index, end: i.index + i[0].length }); + return r; } - getValueInRange(range) { - range = this._validateRange(range); - if (range.startLineNumber === range.endLineNumber) { - return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1); - } - const lineEnding = this._eol; - const startLineIndex = range.startLineNumber - 1; - const endLineIndex = range.endLineNumber - 1; - const resultLines = []; - resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1)); - for (let i = startLineIndex + 1; i < endLineIndex; i++) { - resultLines.push(this._lines[i]); - } - resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1)); - return resultLines.join(lineEnding); + getValueInRange(t) { + if (t = this._validateRange(t), t.startLineNumber === t.endLineNumber) + return this._lines[t.startLineNumber - 1].substring(t.startColumn - 1, t.endColumn - 1); + const n = this._eol, r = t.startLineNumber - 1, i = t.endLineNumber - 1, a = []; + a.push(this._lines[r].substring(t.startColumn - 1)); + for (let o = r + 1; o < i; o++) + a.push(this._lines[o]); + return a.push(this._lines[i].substring(0, t.endColumn - 1)), a.join(n); } - offsetAt(position) { - position = this._validatePosition(position); - this._ensureLineStarts(); - return this._lineStarts.getPrefixSum(position.lineNumber - 2) + (position.column - 1); + offsetAt(t) { + return t = this._validatePosition(t), this._ensureLineStarts(), this._lineStarts.getPrefixSum(t.lineNumber - 2) + (t.column - 1); } - positionAt(offset) { - offset = Math.floor(offset); - offset = Math.max(0, offset); - this._ensureLineStarts(); - const out = this._lineStarts.getIndexOf(offset); - const lineLength = this._lines[out.index].length; + positionAt(t) { + t = Math.floor(t), t = Math.max(0, t), this._ensureLineStarts(); + const n = this._lineStarts.getIndexOf(t), r = this._lines[n.index].length; return { - lineNumber: 1 + out.index, - column: 1 + Math.min(out.remainder, lineLength) + lineNumber: 1 + n.index, + column: 1 + Math.min(n.remainder, r) }; } - _validateRange(range) { - const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn }); - const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn }); - if (start.lineNumber !== range.startLineNumber || start.column !== range.startColumn || end.lineNumber !== range.endLineNumber || end.column !== range.endColumn) { - return { - startLineNumber: start.lineNumber, - startColumn: start.column, - endLineNumber: end.lineNumber, - endColumn: end.column - }; - } - return range; + _validateRange(t) { + const n = this._validatePosition({ lineNumber: t.startLineNumber, column: t.startColumn }), r = this._validatePosition({ lineNumber: t.endLineNumber, column: t.endColumn }); + return n.lineNumber !== t.startLineNumber || n.column !== t.startColumn || r.lineNumber !== t.endLineNumber || r.column !== t.endColumn ? { + startLineNumber: n.lineNumber, + startColumn: n.column, + endLineNumber: r.lineNumber, + endColumn: r.column + } : t; } - _validatePosition(position) { - if (!Position$1.isIPosition(position)) { + _validatePosition(t) { + if (!we.isIPosition(t)) throw new Error("bad position"); + let { lineNumber: n, column: r } = t, i = !1; + if (n < 1) + n = 1, r = 1, i = !0; + else if (n > this._lines.length) + n = this._lines.length, r = this._lines[n - 1].length + 1, i = !0; + else { + const a = this._lines[n - 1].length + 1; + r < 1 ? (r = 1, i = !0) : r > a && (r = a, i = !0); } - let { lineNumber, column } = position; - let hasChanged = false; - if (lineNumber < 1) { - lineNumber = 1; - column = 1; - hasChanged = true; - } else if (lineNumber > this._lines.length) { - lineNumber = this._lines.length; - column = this._lines[lineNumber - 1].length + 1; - hasChanged = true; - } else { - const maxCharacter = this._lines[lineNumber - 1].length + 1; - if (column < 1) { - column = 1; - hasChanged = true; - } else if (column > maxCharacter) { - column = maxCharacter; - hasChanged = true; - } - } - if (!hasChanged) { - return position; - } else { - return { lineNumber, column }; - } + return i ? { lineNumber: n, column: r } : t; } } -class EditorSimpleWorker { - constructor(host, foreignModuleFactory) { - this._host = host; - this._models = /* @__PURE__ */ Object.create(null); - this._foreignModuleFactory = foreignModuleFactory; - this._foreignModule = null; +class _t { + constructor(t, n) { + this._host = t, this._models = /* @__PURE__ */ Object.create(null), this._foreignModuleFactory = n, this._foreignModule = null; } dispose() { this._models = /* @__PURE__ */ Object.create(null); } - _getModel(uri) { - return this._models[uri]; + _getModel(t) { + return this._models[t]; } _getModels() { - const all = []; - Object.keys(this._models).forEach((key) => all.push(this._models[key])); - return all; + const t = []; + return Object.keys(this._models).forEach((n) => t.push(this._models[n])), t; } - acceptNewModel(data) { - this._models[data.url] = new MirrorModel(URI$1.parse(data.url), data.lines, data.EOL, data.versionId); + acceptNewModel(t) { + this._models[t.url] = new uc(ct.parse(t.url), t.lines, t.EOL, t.versionId); } - acceptModelChanged(strURL, e) { - if (!this._models[strURL]) { + acceptModelChanged(t, n) { + if (!this._models[t]) return; - } - const model = this._models[strURL]; - model.onEvents(e); + this._models[t].onEvents(n); } - acceptRemovedModel(strURL) { - if (!this._models[strURL]) { - return; - } - delete this._models[strURL]; + acceptRemovedModel(t) { + !this._models[t] || delete this._models[t]; } - computeUnicodeHighlights(url, options, range) { - return __awaiter$1(this, void 0, void 0, function* () { - const model = this._getModel(url); - if (!model) { - return { ranges: [], hasMore: false, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 }; - } - return UnicodeTextModelHighlighter.computeUnicodeHighlights(model, options, range); + computeUnicodeHighlights(t, n, r) { + return it(this, void 0, void 0, function* () { + const i = this._getModel(t); + return i ? hc.computeUnicodeHighlights(i, n, r) : { ranges: [], hasMore: !1, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 }; }); } - computeDiff(originalUrl, modifiedUrl, ignoreTrimWhitespace, maxComputationTime) { - return __awaiter$1(this, void 0, void 0, function* () { - const original = this._getModel(originalUrl); - const modified = this._getModel(modifiedUrl); - if (!original || !modified) { + computeDiff(t, n, r, i) { + return it(this, void 0, void 0, function* () { + const a = this._getModel(t), o = this._getModel(n); + if (!a || !o) return null; - } - const originalLines = original.getLinesContent(); - const modifiedLines = modified.getLinesContent(); - const diffComputer = new DiffComputer(originalLines, modifiedLines, { - shouldComputeCharChanges: true, - shouldPostProcessCharChanges: true, - shouldIgnoreTrimWhitespace: ignoreTrimWhitespace, - shouldMakePrettyDiff: true, - maxComputationTime - }); - const diffResult = diffComputer.computeDiff(); - const identical = diffResult.changes.length > 0 ? false : this._modelsAreIdentical(original, modified); + const l = a.getLinesContent(), h = o.getLinesContent(), d = new Tl(l, h, { + shouldComputeCharChanges: !0, + shouldPostProcessCharChanges: !0, + shouldIgnoreTrimWhitespace: r, + shouldMakePrettyDiff: !0, + maxComputationTime: i + }).computeDiff(), p = d.changes.length > 0 ? !1 : this._modelsAreIdentical(a, o); return { - quitEarly: diffResult.quitEarly, - identical, - changes: diffResult.changes + quitEarly: d.quitEarly, + identical: p, + changes: d.changes }; }); } - _modelsAreIdentical(original, modified) { - const originalLineCount = original.getLineCount(); - const modifiedLineCount = modified.getLineCount(); - if (originalLineCount !== modifiedLineCount) { - return false; + _modelsAreIdentical(t, n) { + const r = t.getLineCount(), i = n.getLineCount(); + if (r !== i) + return !1; + for (let a = 1; a <= r; a++) { + const o = t.getLineContent(a), l = n.getLineContent(a); + if (o !== l) + return !1; } - for (let line = 1; line <= originalLineCount; line++) { - const originalLine = original.getLineContent(line); - const modifiedLine = modified.getLineContent(line); - if (originalLine !== modifiedLine) { - return false; - } - } - return true; + return !0; } - computeMoreMinimalEdits(modelUrl, edits) { - return __awaiter$1(this, void 0, void 0, function* () { - const model = this._getModel(modelUrl); - if (!model) { - return edits; - } - const result = []; - let lastEol = void 0; - edits = edits.slice(0).sort((a2, b) => { - if (a2.range && b.range) { - return Range$1.compareRangesUsingStarts(a2.range, b.range); - } - const aRng = a2.range ? 0 : 1; - const bRng = b.range ? 0 : 1; - return aRng - bRng; + computeMoreMinimalEdits(t, n) { + return it(this, void 0, void 0, function* () { + const r = this._getModel(t); + if (!r) + return n; + const i = []; + let a; + n = n.slice(0).sort((o, l) => { + if (o.range && l.range) + return te.compareRangesUsingStarts(o.range, l.range); + const h = o.range ? 0 : 1, c = l.range ? 0 : 1; + return h - c; }); - for (let { range, text, eol } of edits) { - if (typeof eol === "number") { - lastEol = eol; - } - if (Range$1.isEmpty(range) && !text) { + for (let { range: o, text: l, eol: h } of n) { + if (typeof h == "number" && (a = h), te.isEmpty(o) && !l) + continue; + const c = r.getValueInRange(o); + if (l = l.replace(/\r\n|\n|\r/g, r.eol), c === l) + continue; + if (Math.max(l.length, c.length) > _t._diffLimit) { + i.push({ range: o, text: l }); continue; } - const original = model.getValueInRange(range); - text = text.replace(/\r\n|\n|\r/g, model.eol); - if (original === text) { - continue; - } - if (Math.max(text.length, original.length) > EditorSimpleWorker._diffLimit) { - result.push({ range, text }); - continue; - } - const changes = stringDiff(original, text, false); - const editOffset = model.offsetAt(Range$1.lift(range).getStartPosition()); - for (const change of changes) { - const start = model.positionAt(editOffset + change.originalStart); - const end = model.positionAt(editOffset + change.originalStart + change.originalLength); - const newEdit = { - text: text.substr(change.modifiedStart, change.modifiedLength), - range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column } + const d = wl(c, l, !1), p = r.offsetAt(te.lift(o).getStartPosition()); + for (const f of d) { + const g = r.positionAt(p + f.originalStart), w = r.positionAt(p + f.originalStart + f.originalLength), b = { + text: l.substr(f.modifiedStart, f.modifiedLength), + range: { startLineNumber: g.lineNumber, startColumn: g.column, endLineNumber: w.lineNumber, endColumn: w.column } }; - if (model.getValueInRange(newEdit.range) !== newEdit.text) { - result.push(newEdit); - } + r.getValueInRange(b.range) !== b.text && i.push(b); } } - if (typeof lastEol === "number") { - result.push({ eol: lastEol, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }); - } - return result; + return typeof a == "number" && i.push({ eol: a, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }), i; }); } - computeLinks(modelUrl) { - return __awaiter$1(this, void 0, void 0, function* () { - const model = this._getModel(modelUrl); - if (!model) { - return null; - } - return computeLinks(model); + computeLinks(t) { + return it(this, void 0, void 0, function* () { + const n = this._getModel(t); + return n ? Yl(n) : null; }); } - textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) { - return __awaiter$1(this, void 0, void 0, function* () { - const sw = new StopWatch(true); - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - const seen = /* @__PURE__ */ new Set(); - outer: - for (let url of modelUrls) { - const model = this._getModel(url); - if (!model) { - continue; - } - for (let word of model.words(wordDefRegExp)) { - if (word === leadingWord || !isNaN(Number(word))) { - continue; - } - seen.add(word); - if (seen.size > EditorSimpleWorker._suggestionsLimit) { - break outer; - } + textualSuggest(t, n, r, i) { + return it(this, void 0, void 0, function* () { + const a = new Tn(!0), o = new RegExp(r, i), l = /* @__PURE__ */ new Set(); + e: + for (let h of t) { + const c = this._getModel(h); + if (!!c) { + for (let d of c.words(o)) + if (!(d === n || !isNaN(Number(d))) && (l.add(d), l.size > _t._suggestionsLimit)) + break e; } } - return { words: Array.from(seen), duration: sw.elapsed() }; + return { words: Array.from(l), duration: a.elapsed() }; }); } - computeWordRanges(modelUrl, range, wordDef, wordDefFlags) { - return __awaiter$1(this, void 0, void 0, function* () { - const model = this._getModel(modelUrl); - if (!model) { + computeWordRanges(t, n, r, i) { + return it(this, void 0, void 0, function* () { + const a = this._getModel(t); + if (!a) return /* @__PURE__ */ Object.create(null); - } - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - const result = /* @__PURE__ */ Object.create(null); - for (let line = range.startLineNumber; line < range.endLineNumber; line++) { - const words = model.getLineWords(line, wordDefRegExp); - for (const word of words) { - if (!isNaN(Number(word.word))) { + const o = new RegExp(r, i), l = /* @__PURE__ */ Object.create(null); + for (let h = n.startLineNumber; h < n.endLineNumber; h++) { + const c = a.getLineWords(h, o); + for (const d of c) { + if (!isNaN(Number(d.word))) continue; - } - let array = result[word.word]; - if (!array) { - array = []; - result[word.word] = array; - } - array.push({ - startLineNumber: line, - startColumn: word.startColumn, - endLineNumber: line, - endColumn: word.endColumn + let p = l[d.word]; + p || (p = [], l[d.word] = p), p.push({ + startLineNumber: h, + startColumn: d.startColumn, + endLineNumber: h, + endColumn: d.endColumn }); } } - return result; + return l; }); } - navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) { - return __awaiter$1(this, void 0, void 0, function* () { - const model = this._getModel(modelUrl); - if (!model) { + navigateValueSet(t, n, r, i, a) { + return it(this, void 0, void 0, function* () { + const o = this._getModel(t); + if (!o) return null; - } - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - if (range.startColumn === range.endColumn) { - range = { - startLineNumber: range.startLineNumber, - startColumn: range.startColumn, - endLineNumber: range.endLineNumber, - endColumn: range.endColumn + 1 - }; - } - const selectionText = model.getValueInRange(range); - const wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp); - if (!wordRange) { + const l = new RegExp(i, a); + n.startColumn === n.endColumn && (n = { + startLineNumber: n.startLineNumber, + startColumn: n.startColumn, + endLineNumber: n.endLineNumber, + endColumn: n.endColumn + 1 + }); + const h = o.getValueInRange(n), c = o.getWordAtPosition({ lineNumber: n.startLineNumber, column: n.startColumn }, l); + if (!c) return null; - } - const word = model.getValueInRange(wordRange); - const result = BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word, up); - return result; + const d = o.getValueInRange(c); + return wr.INSTANCE.navigateValueSet(n, h, c, d, r); }); } - loadForeignModule(moduleId, createData, foreignHostMethods) { - const proxyMethodRequest = (method, args) => { - return this._host.fhr(method, args); + loadForeignModule(t, n, r) { + const o = { + host: Qo(r, (l, h) => this._host.fhr(l, h)), + getMirrorModels: () => this._getModels() }; - const foreignHost = createProxyObject$1(foreignHostMethods, proxyMethodRequest); - const ctx = { - host: foreignHost, - getMirrorModels: () => { - return this._getModels(); - } - }; - if (this._foreignModuleFactory) { - this._foreignModule = this._foreignModuleFactory(ctx, createData); - return Promise.resolve(getAllMethodNames(this._foreignModule)); - } - return Promise.reject(new Error(`Unexpected usage`)); + return this._foreignModuleFactory ? (this._foreignModule = this._foreignModuleFactory(o, n), Promise.resolve(ur(this._foreignModule))) : Promise.reject(new Error("Unexpected usage")); } - fmr(method, args) { - if (!this._foreignModule || typeof this._foreignModule[method] !== "function") { - return Promise.reject(new Error("Missing requestHandler or method: " + method)); - } + fmr(t, n) { + if (!this._foreignModule || typeof this._foreignModule[t] != "function") + return Promise.reject(new Error("Missing requestHandler or method: " + t)); try { - return Promise.resolve(this._foreignModule[method].apply(this._foreignModule, args)); - } catch (e) { - return Promise.reject(e); + return Promise.resolve(this._foreignModule[t].apply(this._foreignModule, n)); + } catch (r) { + return Promise.reject(r); } } } -EditorSimpleWorker._diffLimit = 1e5; -EditorSimpleWorker._suggestionsLimit = 1e4; -if (typeof importScripts === "function") { - globals.monaco = createMonacoBaseAPI(); -} -let initialized = false; -function initialize(foreignModule) { - if (initialized) { +_t._diffLimit = 1e5; +_t._suggestionsLimit = 1e4; +typeof importScripts == "function" && (fe.monaco = ac()); +let Er = !1; +function io(e) { + if (Er) return; - } - initialized = true; - const simpleWorker = new SimpleWorkerServer((msg) => { - self.postMessage(msg); - }, (host) => new EditorSimpleWorker(host, foreignModule)); - self.onmessage = (e) => { - simpleWorker.onmessage(e.data); + Er = !0; + const t = new vl((n) => { + self.postMessage(n); + }, (n) => new _t(n, e)); + self.onmessage = (n) => { + t.onmessage(n.data); }; } self.onmessage = (e) => { - if (!initialized) { - initialize(null); - } + Er || io(null); }; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. @@ -7584,3697 +4717,2402 @@ self.onmessage = (e) => { * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ -var TokenType; -(function(TokenType2) { - TokenType2[TokenType2["Ident"] = 0] = "Ident"; - TokenType2[TokenType2["AtKeyword"] = 1] = "AtKeyword"; - TokenType2[TokenType2["String"] = 2] = "String"; - TokenType2[TokenType2["BadString"] = 3] = "BadString"; - TokenType2[TokenType2["UnquotedString"] = 4] = "UnquotedString"; - TokenType2[TokenType2["Hash"] = 5] = "Hash"; - TokenType2[TokenType2["Num"] = 6] = "Num"; - TokenType2[TokenType2["Percentage"] = 7] = "Percentage"; - TokenType2[TokenType2["Dimension"] = 8] = "Dimension"; - TokenType2[TokenType2["UnicodeRange"] = 9] = "UnicodeRange"; - TokenType2[TokenType2["CDO"] = 10] = "CDO"; - TokenType2[TokenType2["CDC"] = 11] = "CDC"; - TokenType2[TokenType2["Colon"] = 12] = "Colon"; - TokenType2[TokenType2["SemiColon"] = 13] = "SemiColon"; - TokenType2[TokenType2["CurlyL"] = 14] = "CurlyL"; - TokenType2[TokenType2["CurlyR"] = 15] = "CurlyR"; - TokenType2[TokenType2["ParenthesisL"] = 16] = "ParenthesisL"; - TokenType2[TokenType2["ParenthesisR"] = 17] = "ParenthesisR"; - TokenType2[TokenType2["BracketL"] = 18] = "BracketL"; - TokenType2[TokenType2["BracketR"] = 19] = "BracketR"; - TokenType2[TokenType2["Whitespace"] = 20] = "Whitespace"; - TokenType2[TokenType2["Includes"] = 21] = "Includes"; - TokenType2[TokenType2["Dashmatch"] = 22] = "Dashmatch"; - TokenType2[TokenType2["SubstringOperator"] = 23] = "SubstringOperator"; - TokenType2[TokenType2["PrefixOperator"] = 24] = "PrefixOperator"; - TokenType2[TokenType2["SuffixOperator"] = 25] = "SuffixOperator"; - TokenType2[TokenType2["Delim"] = 26] = "Delim"; - TokenType2[TokenType2["EMS"] = 27] = "EMS"; - TokenType2[TokenType2["EXS"] = 28] = "EXS"; - TokenType2[TokenType2["Length"] = 29] = "Length"; - TokenType2[TokenType2["Angle"] = 30] = "Angle"; - TokenType2[TokenType2["Time"] = 31] = "Time"; - TokenType2[TokenType2["Freq"] = 32] = "Freq"; - TokenType2[TokenType2["Exclamation"] = 33] = "Exclamation"; - TokenType2[TokenType2["Resolution"] = 34] = "Resolution"; - TokenType2[TokenType2["Comma"] = 35] = "Comma"; - TokenType2[TokenType2["Charset"] = 36] = "Charset"; - TokenType2[TokenType2["EscapedJavaScript"] = 37] = "EscapedJavaScript"; - TokenType2[TokenType2["BadEscapedJavaScript"] = 38] = "BadEscapedJavaScript"; - TokenType2[TokenType2["Comment"] = 39] = "Comment"; - TokenType2[TokenType2["SingleLineComment"] = 40] = "SingleLineComment"; - TokenType2[TokenType2["EOF"] = 41] = "EOF"; - TokenType2[TokenType2["CustomToken"] = 42] = "CustomToken"; -})(TokenType || (TokenType = {})); -var MultiLineStream = function() { - function MultiLineStream2(source) { - this.source = source; - this.len = source.length; - this.position = 0; +var u; +(function(e) { + e[e.Ident = 0] = "Ident", e[e.AtKeyword = 1] = "AtKeyword", e[e.String = 2] = "String", e[e.BadString = 3] = "BadString", e[e.UnquotedString = 4] = "UnquotedString", e[e.Hash = 5] = "Hash", e[e.Num = 6] = "Num", e[e.Percentage = 7] = "Percentage", e[e.Dimension = 8] = "Dimension", e[e.UnicodeRange = 9] = "UnicodeRange", e[e.CDO = 10] = "CDO", e[e.CDC = 11] = "CDC", e[e.Colon = 12] = "Colon", e[e.SemiColon = 13] = "SemiColon", e[e.CurlyL = 14] = "CurlyL", e[e.CurlyR = 15] = "CurlyR", e[e.ParenthesisL = 16] = "ParenthesisL", e[e.ParenthesisR = 17] = "ParenthesisR", e[e.BracketL = 18] = "BracketL", e[e.BracketR = 19] = "BracketR", e[e.Whitespace = 20] = "Whitespace", e[e.Includes = 21] = "Includes", e[e.Dashmatch = 22] = "Dashmatch", e[e.SubstringOperator = 23] = "SubstringOperator", e[e.PrefixOperator = 24] = "PrefixOperator", e[e.SuffixOperator = 25] = "SuffixOperator", e[e.Delim = 26] = "Delim", e[e.EMS = 27] = "EMS", e[e.EXS = 28] = "EXS", e[e.Length = 29] = "Length", e[e.Angle = 30] = "Angle", e[e.Time = 31] = "Time", e[e.Freq = 32] = "Freq", e[e.Exclamation = 33] = "Exclamation", e[e.Resolution = 34] = "Resolution", e[e.Comma = 35] = "Comma", e[e.Charset = 36] = "Charset", e[e.EscapedJavaScript = 37] = "EscapedJavaScript", e[e.BadEscapedJavaScript = 38] = "BadEscapedJavaScript", e[e.Comment = 39] = "Comment", e[e.SingleLineComment = 40] = "SingleLineComment", e[e.EOF = 41] = "EOF", e[e.CustomToken = 42] = "CustomToken"; +})(u || (u = {})); +var Fa = function() { + function e(t) { + this.source = t, this.len = t.length, this.position = 0; } - MultiLineStream2.prototype.substring = function(from, to) { - if (to === void 0) { - to = this.position; - } - return this.source.substring(from, to); - }; - MultiLineStream2.prototype.eos = function() { + return e.prototype.substring = function(t, n) { + return n === void 0 && (n = this.position), this.source.substring(t, n); + }, e.prototype.eos = function() { return this.len <= this.position; - }; - MultiLineStream2.prototype.pos = function() { + }, e.prototype.pos = function() { return this.position; - }; - MultiLineStream2.prototype.goBackTo = function(pos) { - this.position = pos; - }; - MultiLineStream2.prototype.goBack = function(n) { - this.position -= n; - }; - MultiLineStream2.prototype.advance = function(n) { - this.position += n; - }; - MultiLineStream2.prototype.nextChar = function() { + }, e.prototype.goBackTo = function(t) { + this.position = t; + }, e.prototype.goBack = function(t) { + this.position -= t; + }, e.prototype.advance = function(t) { + this.position += t; + }, e.prototype.nextChar = function() { return this.source.charCodeAt(this.position++) || 0; - }; - MultiLineStream2.prototype.peekChar = function(n) { - if (n === void 0) { - n = 0; - } - return this.source.charCodeAt(this.position + n) || 0; - }; - MultiLineStream2.prototype.lookbackChar = function(n) { - if (n === void 0) { - n = 0; - } - return this.source.charCodeAt(this.position - n) || 0; - }; - MultiLineStream2.prototype.advanceIfChar = function(ch) { - if (ch === this.source.charCodeAt(this.position)) { + }, e.prototype.peekChar = function(t) { + return t === void 0 && (t = 0), this.source.charCodeAt(this.position + t) || 0; + }, e.prototype.lookbackChar = function(t) { + return t === void 0 && (t = 0), this.source.charCodeAt(this.position - t) || 0; + }, e.prototype.advanceIfChar = function(t) { + return t === this.source.charCodeAt(this.position) ? (this.position++, !0) : !1; + }, e.prototype.advanceIfChars = function(t) { + if (this.position + t.length > this.source.length) + return !1; + for (var n = 0; n < t.length; n++) + if (this.source.charCodeAt(this.position + n) !== t[n]) + return !1; + return this.advance(n), !0; + }, e.prototype.advanceWhileChar = function(t) { + for (var n = this.position; this.position < this.len && t(this.source.charCodeAt(this.position)); ) this.position++; - return true; - } - return false; - }; - MultiLineStream2.prototype.advanceIfChars = function(ch) { - if (this.position + ch.length > this.source.length) { - return false; - } - var i = 0; - for (; i < ch.length; i++) { - if (this.source.charCodeAt(this.position + i) !== ch[i]) { - return false; - } - } - this.advance(i); - return true; - }; - MultiLineStream2.prototype.advanceWhileChar = function(condition) { - var posNow = this.position; - while (this.position < this.len && condition(this.source.charCodeAt(this.position))) { - this.position++; - } - return this.position - posNow; - }; - return MultiLineStream2; -}(); -var _a = "a".charCodeAt(0); -var _f = "f".charCodeAt(0); -var _z = "z".charCodeAt(0); -var _A = "A".charCodeAt(0); -var _F = "F".charCodeAt(0); -var _Z = "Z".charCodeAt(0); -var _0 = "0".charCodeAt(0); -var _9 = "9".charCodeAt(0); -var _TLD = "~".charCodeAt(0); -var _HAT = "^".charCodeAt(0); -var _EQS = "=".charCodeAt(0); -var _PIP = "|".charCodeAt(0); -var _MIN = "-".charCodeAt(0); -var _USC = "_".charCodeAt(0); -var _PRC = "%".charCodeAt(0); -var _MUL = "*".charCodeAt(0); -var _LPA = "(".charCodeAt(0); -var _RPA = ")".charCodeAt(0); -var _LAN = "<".charCodeAt(0); -var _RAN = ">".charCodeAt(0); -var _ATS = "@".charCodeAt(0); -var _HSH = "#".charCodeAt(0); -var _DLR = "$".charCodeAt(0); -var _BSL = "\\".charCodeAt(0); -var _FSL = "/".charCodeAt(0); -var _NWL = "\n".charCodeAt(0); -var _CAR = "\r".charCodeAt(0); -var _LFD = "\f".charCodeAt(0); -var _DQO = '"'.charCodeAt(0); -var _SQO = "'".charCodeAt(0); -var _WSP = " ".charCodeAt(0); -var _TAB = " ".charCodeAt(0); -var _SEM = ";".charCodeAt(0); -var _COL = ":".charCodeAt(0); -var _CUL = "{".charCodeAt(0); -var _CUR = "}".charCodeAt(0); -var _BRL = "[".charCodeAt(0); -var _BRR = "]".charCodeAt(0); -var _CMA = ",".charCodeAt(0); -var _DOT = ".".charCodeAt(0); -var _BNG = "!".charCodeAt(0); -var staticTokenTable = {}; -staticTokenTable[_SEM] = TokenType.SemiColon; -staticTokenTable[_COL] = TokenType.Colon; -staticTokenTable[_CUL] = TokenType.CurlyL; -staticTokenTable[_CUR] = TokenType.CurlyR; -staticTokenTable[_BRR] = TokenType.BracketR; -staticTokenTable[_BRL] = TokenType.BracketL; -staticTokenTable[_LPA] = TokenType.ParenthesisL; -staticTokenTable[_RPA] = TokenType.ParenthesisR; -staticTokenTable[_CMA] = TokenType.Comma; -var staticUnitTable = {}; -staticUnitTable["em"] = TokenType.EMS; -staticUnitTable["ex"] = TokenType.EXS; -staticUnitTable["px"] = TokenType.Length; -staticUnitTable["cm"] = TokenType.Length; -staticUnitTable["mm"] = TokenType.Length; -staticUnitTable["in"] = TokenType.Length; -staticUnitTable["pt"] = TokenType.Length; -staticUnitTable["pc"] = TokenType.Length; -staticUnitTable["deg"] = TokenType.Angle; -staticUnitTable["rad"] = TokenType.Angle; -staticUnitTable["grad"] = TokenType.Angle; -staticUnitTable["ms"] = TokenType.Time; -staticUnitTable["s"] = TokenType.Time; -staticUnitTable["hz"] = TokenType.Freq; -staticUnitTable["khz"] = TokenType.Freq; -staticUnitTable["%"] = TokenType.Percentage; -staticUnitTable["fr"] = TokenType.Percentage; -staticUnitTable["dpi"] = TokenType.Resolution; -staticUnitTable["dpcm"] = TokenType.Resolution; -var Scanner = function() { - function Scanner2() { - this.stream = new MultiLineStream(""); - this.ignoreComment = true; - this.ignoreWhitespace = true; - this.inURL = false; + return this.position - n; + }, e; +}(), Hn = "a".charCodeAt(0), pc = "f".charCodeAt(0), _a = "z".charCodeAt(0), Gn = "A".charCodeAt(0), fc = "F".charCodeAt(0), Da = "Z".charCodeAt(0), sn = "0".charCodeAt(0), on = "9".charCodeAt(0), mc = "~".charCodeAt(0), gc = "^".charCodeAt(0), Nt = "=".charCodeAt(0), bc = "|".charCodeAt(0), mt = "-".charCodeAt(0), Ea = "_".charCodeAt(0), vc = "%".charCodeAt(0), Jn = "*".charCodeAt(0), ao = "(".charCodeAt(0), so = ")".charCodeAt(0), yc = "<".charCodeAt(0), wc = ">".charCodeAt(0), xc = "@".charCodeAt(0), Sc = "#".charCodeAt(0), Cc = "$".charCodeAt(0), Xn = "\\".charCodeAt(0), Ra = "/".charCodeAt(0), gt = ` +`.charCodeAt(0), bt = "\r".charCodeAt(0), Pt = "\f".charCodeAt(0), Aa = '"'.charCodeAt(0), za = "'".charCodeAt(0), Yn = " ".charCodeAt(0), Kn = " ".charCodeAt(0), kc = ";".charCodeAt(0), Fc = ":".charCodeAt(0), _c = "{".charCodeAt(0), Dc = "}".charCodeAt(0), Ec = "[".charCodeAt(0), Rc = "]".charCodeAt(0), Ac = ",".charCodeAt(0), Ma = ".".charCodeAt(0), Na = "!".charCodeAt(0), Ue = {}; +Ue[kc] = u.SemiColon; +Ue[Fc] = u.Colon; +Ue[_c] = u.CurlyL; +Ue[Dc] = u.CurlyR; +Ue[Rc] = u.BracketR; +Ue[Ec] = u.BracketL; +Ue[ao] = u.ParenthesisL; +Ue[so] = u.ParenthesisR; +Ue[Ac] = u.Comma; +var le = {}; +le.em = u.EMS; +le.ex = u.EXS; +le.px = u.Length; +le.cm = u.Length; +le.mm = u.Length; +le.in = u.Length; +le.pt = u.Length; +le.pc = u.Length; +le.deg = u.Angle; +le.rad = u.Angle; +le.grad = u.Angle; +le.ms = u.Time; +le.s = u.Time; +le.hz = u.Freq; +le.khz = u.Freq; +le["%"] = u.Percentage; +le.fr = u.Percentage; +le.dpi = u.Resolution; +le.dpcm = u.Resolution; +var en = function() { + function e() { + this.stream = new Fa(""), this.ignoreComment = !0, this.ignoreWhitespace = !0, this.inURL = !1; } - Scanner2.prototype.setSource = function(input) { - this.stream = new MultiLineStream(input); - }; - Scanner2.prototype.finishToken = function(offset, type, text) { + return e.prototype.setSource = function(t) { + this.stream = new Fa(t); + }, e.prototype.finishToken = function(t, n, r) { return { - offset, - len: this.stream.pos() - offset, - type, - text: text || this.stream.substring(offset) + offset: t, + len: this.stream.pos() - t, + type: n, + text: r || this.stream.substring(t) }; - }; - Scanner2.prototype.substring = function(offset, len) { - return this.stream.substring(offset, offset + len); - }; - Scanner2.prototype.pos = function() { + }, e.prototype.substring = function(t, n) { + return this.stream.substring(t, t + n); + }, e.prototype.pos = function() { return this.stream.pos(); - }; - Scanner2.prototype.goBackTo = function(pos) { - this.stream.goBackTo(pos); - }; - Scanner2.prototype.scanUnquotedString = function() { - var offset = this.stream.pos(); - var content = []; - if (this._unquotedString(content)) { - return this.finishToken(offset, TokenType.UnquotedString, content.join("")); - } - return null; - }; - Scanner2.prototype.scan = function() { - var triviaToken = this.trivia(); - if (triviaToken !== null) { - return triviaToken; - } - var offset = this.stream.pos(); - if (this.stream.eos()) { - return this.finishToken(offset, TokenType.EOF); - } - return this.scanNext(offset); - }; - Scanner2.prototype.scanNext = function(offset) { - if (this.stream.advanceIfChars([_LAN, _BNG, _MIN, _MIN])) { - return this.finishToken(offset, TokenType.CDO); - } - if (this.stream.advanceIfChars([_MIN, _MIN, _RAN])) { - return this.finishToken(offset, TokenType.CDC); - } - var content = []; - if (this.ident(content)) { - return this.finishToken(offset, TokenType.Ident, content.join("")); - } - if (this.stream.advanceIfChar(_ATS)) { - content = ["@"]; - if (this._name(content)) { - var keywordText = content.join(""); - if (keywordText === "@charset") { - return this.finishToken(offset, TokenType.Charset, keywordText); - } - return this.finishToken(offset, TokenType.AtKeyword, keywordText); - } else { - return this.finishToken(offset, TokenType.Delim); - } - } - if (this.stream.advanceIfChar(_HSH)) { - content = ["#"]; - if (this._name(content)) { - return this.finishToken(offset, TokenType.Hash, content.join("")); - } else { - return this.finishToken(offset, TokenType.Delim); - } - } - if (this.stream.advanceIfChar(_BNG)) { - return this.finishToken(offset, TokenType.Exclamation); - } + }, e.prototype.goBackTo = function(t) { + this.stream.goBackTo(t); + }, e.prototype.scanUnquotedString = function() { + var t = this.stream.pos(), n = []; + return this._unquotedString(n) ? this.finishToken(t, u.UnquotedString, n.join("")) : null; + }, e.prototype.scan = function() { + var t = this.trivia(); + if (t !== null) + return t; + var n = this.stream.pos(); + return this.stream.eos() ? this.finishToken(n, u.EOF) : this.scanNext(n); + }, e.prototype.scanNext = function(t) { + if (this.stream.advanceIfChars([yc, Na, mt, mt])) + return this.finishToken(t, u.CDO); + if (this.stream.advanceIfChars([mt, mt, wc])) + return this.finishToken(t, u.CDC); + var n = []; + if (this.ident(n)) + return this.finishToken(t, u.Ident, n.join("")); + if (this.stream.advanceIfChar(xc)) + if (n = ["@"], this._name(n)) { + var r = n.join(""); + return r === "@charset" ? this.finishToken(t, u.Charset, r) : this.finishToken(t, u.AtKeyword, r); + } else + return this.finishToken(t, u.Delim); + if (this.stream.advanceIfChar(Sc)) + return n = ["#"], this._name(n) ? this.finishToken(t, u.Hash, n.join("")) : this.finishToken(t, u.Delim); + if (this.stream.advanceIfChar(Na)) + return this.finishToken(t, u.Exclamation); if (this._number()) { - var pos = this.stream.pos(); - content = [this.stream.substring(offset, pos)]; - if (this.stream.advanceIfChar(_PRC)) { - return this.finishToken(offset, TokenType.Percentage); - } else if (this.ident(content)) { - var dim = this.stream.substring(pos).toLowerCase(); - var tokenType_1 = staticUnitTable[dim]; - if (typeof tokenType_1 !== "undefined") { - return this.finishToken(offset, tokenType_1, content.join("")); - } else { - return this.finishToken(offset, TokenType.Dimension, content.join("")); - } + var i = this.stream.pos(); + if (n = [this.stream.substring(t, i)], this.stream.advanceIfChar(vc)) + return this.finishToken(t, u.Percentage); + if (this.ident(n)) { + var a = this.stream.substring(i).toLowerCase(), o = le[a]; + return typeof o < "u" ? this.finishToken(t, o, n.join("")) : this.finishToken(t, u.Dimension, n.join("")); } - return this.finishToken(offset, TokenType.Num); + return this.finishToken(t, u.Num); } - content = []; - var tokenType = this._string(content); - if (tokenType !== null) { - return this.finishToken(offset, tokenType, content.join("")); - } - tokenType = staticTokenTable[this.stream.peekChar()]; - if (typeof tokenType !== "undefined") { - this.stream.advance(1); - return this.finishToken(offset, tokenType); - } - if (this.stream.peekChar(0) === _TLD && this.stream.peekChar(1) === _EQS) { - this.stream.advance(2); - return this.finishToken(offset, TokenType.Includes); - } - if (this.stream.peekChar(0) === _PIP && this.stream.peekChar(1) === _EQS) { - this.stream.advance(2); - return this.finishToken(offset, TokenType.Dashmatch); - } - if (this.stream.peekChar(0) === _MUL && this.stream.peekChar(1) === _EQS) { - this.stream.advance(2); - return this.finishToken(offset, TokenType.SubstringOperator); - } - if (this.stream.peekChar(0) === _HAT && this.stream.peekChar(1) === _EQS) { - this.stream.advance(2); - return this.finishToken(offset, TokenType.PrefixOperator); - } - if (this.stream.peekChar(0) === _DLR && this.stream.peekChar(1) === _EQS) { - this.stream.advance(2); - return this.finishToken(offset, TokenType.SuffixOperator); - } - this.stream.nextChar(); - return this.finishToken(offset, TokenType.Delim); - }; - Scanner2.prototype.trivia = function() { - while (true) { - var offset = this.stream.pos(); + n = []; + var l = this._string(n); + return l !== null ? this.finishToken(t, l, n.join("")) : (l = Ue[this.stream.peekChar()], typeof l < "u" ? (this.stream.advance(1), this.finishToken(t, l)) : this.stream.peekChar(0) === mc && this.stream.peekChar(1) === Nt ? (this.stream.advance(2), this.finishToken(t, u.Includes)) : this.stream.peekChar(0) === bc && this.stream.peekChar(1) === Nt ? (this.stream.advance(2), this.finishToken(t, u.Dashmatch)) : this.stream.peekChar(0) === Jn && this.stream.peekChar(1) === Nt ? (this.stream.advance(2), this.finishToken(t, u.SubstringOperator)) : this.stream.peekChar(0) === gc && this.stream.peekChar(1) === Nt ? (this.stream.advance(2), this.finishToken(t, u.PrefixOperator)) : this.stream.peekChar(0) === Cc && this.stream.peekChar(1) === Nt ? (this.stream.advance(2), this.finishToken(t, u.SuffixOperator)) : (this.stream.nextChar(), this.finishToken(t, u.Delim))); + }, e.prototype.trivia = function() { + for (; ; ) { + var t = this.stream.pos(); if (this._whitespace()) { - if (!this.ignoreWhitespace) { - return this.finishToken(offset, TokenType.Whitespace); - } + if (!this.ignoreWhitespace) + return this.finishToken(t, u.Whitespace); } else if (this.comment()) { - if (!this.ignoreComment) { - return this.finishToken(offset, TokenType.Comment); - } - } else { + if (!this.ignoreComment) + return this.finishToken(t, u.Comment); + } else return null; - } } - }; - Scanner2.prototype.comment = function() { - if (this.stream.advanceIfChars([_FSL, _MUL])) { - var success_1 = false, hot_1 = false; - this.stream.advanceWhileChar(function(ch) { - if (hot_1 && ch === _FSL) { - success_1 = true; - return false; - } - hot_1 = ch === _MUL; - return true; - }); - if (success_1) { - this.stream.advance(1); - } - return true; + }, e.prototype.comment = function() { + if (this.stream.advanceIfChars([Ra, Jn])) { + var t = !1, n = !1; + return this.stream.advanceWhileChar(function(r) { + return n && r === Ra ? (t = !0, !1) : (n = r === Jn, !0); + }), t && this.stream.advance(1), !0; } - return false; - }; - Scanner2.prototype._number = function() { - var npeek = 0, ch; - if (this.stream.peekChar() === _DOT) { - npeek = 1; + return !1; + }, e.prototype._number = function() { + var t = 0, n; + return this.stream.peekChar() === Ma && (t = 1), n = this.stream.peekChar(t), n >= sn && n <= on ? (this.stream.advance(t + 1), this.stream.advanceWhileChar(function(r) { + return r >= sn && r <= on || t === 0 && r === Ma; + }), !0) : !1; + }, e.prototype._newline = function(t) { + var n = this.stream.peekChar(); + switch (n) { + case bt: + case Pt: + case gt: + return this.stream.advance(1), t.push(String.fromCharCode(n)), n === bt && this.stream.advanceIfChar(gt) && t.push(` +`), !0; } - ch = this.stream.peekChar(npeek); - if (ch >= _0 && ch <= _9) { - this.stream.advance(npeek + 1); - this.stream.advanceWhileChar(function(ch2) { - return ch2 >= _0 && ch2 <= _9 || npeek === 0 && ch2 === _DOT; - }); - return true; - } - return false; - }; - Scanner2.prototype._newline = function(result) { - var ch = this.stream.peekChar(); - switch (ch) { - case _CAR: - case _LFD: - case _NWL: - this.stream.advance(1); - result.push(String.fromCharCode(ch)); - if (ch === _CAR && this.stream.advanceIfChar(_NWL)) { - result.push("\n"); - } - return true; - } - return false; - }; - Scanner2.prototype._escape = function(result, includeNewLines) { - var ch = this.stream.peekChar(); - if (ch === _BSL) { - this.stream.advance(1); - ch = this.stream.peekChar(); - var hexNumCount = 0; - while (hexNumCount < 6 && (ch >= _0 && ch <= _9 || ch >= _a && ch <= _f || ch >= _A && ch <= _F)) { - this.stream.advance(1); - ch = this.stream.peekChar(); - hexNumCount++; - } - if (hexNumCount > 0) { + return !1; + }, e.prototype._escape = function(t, n) { + var r = this.stream.peekChar(); + if (r === Xn) { + this.stream.advance(1), r = this.stream.peekChar(); + for (var i = 0; i < 6 && (r >= sn && r <= on || r >= Hn && r <= pc || r >= Gn && r <= fc); ) + this.stream.advance(1), r = this.stream.peekChar(), i++; + if (i > 0) { try { - var hexVal = parseInt(this.stream.substring(this.stream.pos() - hexNumCount), 16); - if (hexVal) { - result.push(String.fromCharCode(hexVal)); - } - } catch (e) { + var a = parseInt(this.stream.substring(this.stream.pos() - i), 16); + a && t.push(String.fromCharCode(a)); + } catch { } - if (ch === _WSP || ch === _TAB) { - this.stream.advance(1); - } else { - this._newline([]); - } - return true; - } - if (ch !== _CAR && ch !== _LFD && ch !== _NWL) { - this.stream.advance(1); - result.push(String.fromCharCode(ch)); - return true; - } else if (includeNewLines) { - return this._newline(result); + return r === Yn || r === Kn ? this.stream.advance(1) : this._newline([]), !0; } + if (r !== bt && r !== Pt && r !== gt) + return this.stream.advance(1), t.push(String.fromCharCode(r)), !0; + if (n) + return this._newline(t); } - return false; - }; - Scanner2.prototype._stringChar = function(closeQuote, result) { - var ch = this.stream.peekChar(); - if (ch !== 0 && ch !== closeQuote && ch !== _BSL && ch !== _CAR && ch !== _LFD && ch !== _NWL) { - this.stream.advance(1); - result.push(String.fromCharCode(ch)); - return true; - } - return false; - }; - Scanner2.prototype._string = function(result) { - if (this.stream.peekChar() === _SQO || this.stream.peekChar() === _DQO) { - var closeQuote = this.stream.nextChar(); - result.push(String.fromCharCode(closeQuote)); - while (this._stringChar(closeQuote, result) || this._escape(result, true)) { - } - if (this.stream.peekChar() === closeQuote) { - this.stream.nextChar(); - result.push(String.fromCharCode(closeQuote)); - return TokenType.String; - } else { - return TokenType.BadString; - } + return !1; + }, e.prototype._stringChar = function(t, n) { + var r = this.stream.peekChar(); + return r !== 0 && r !== t && r !== Xn && r !== bt && r !== Pt && r !== gt ? (this.stream.advance(1), n.push(String.fromCharCode(r)), !0) : !1; + }, e.prototype._string = function(t) { + if (this.stream.peekChar() === za || this.stream.peekChar() === Aa) { + var n = this.stream.nextChar(); + for (t.push(String.fromCharCode(n)); this._stringChar(n, t) || this._escape(t, !0); ) + ; + return this.stream.peekChar() === n ? (this.stream.nextChar(), t.push(String.fromCharCode(n)), u.String) : u.BadString; } return null; - }; - Scanner2.prototype._unquotedChar = function(result) { - var ch = this.stream.peekChar(); - if (ch !== 0 && ch !== _BSL && ch !== _SQO && ch !== _DQO && ch !== _LPA && ch !== _RPA && ch !== _WSP && ch !== _TAB && ch !== _NWL && ch !== _LFD && ch !== _CAR) { - this.stream.advance(1); - result.push(String.fromCharCode(ch)); - return true; - } - return false; - }; - Scanner2.prototype._unquotedString = function(result) { - var hasContent = false; - while (this._unquotedChar(result) || this._escape(result)) { - hasContent = true; - } - return hasContent; - }; - Scanner2.prototype._whitespace = function() { - var n = this.stream.advanceWhileChar(function(ch) { - return ch === _WSP || ch === _TAB || ch === _NWL || ch === _LFD || ch === _CAR; + }, e.prototype._unquotedChar = function(t) { + var n = this.stream.peekChar(); + return n !== 0 && n !== Xn && n !== za && n !== Aa && n !== ao && n !== so && n !== Yn && n !== Kn && n !== gt && n !== Pt && n !== bt ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; + }, e.prototype._unquotedString = function(t) { + for (var n = !1; this._unquotedChar(t) || this._escape(t); ) + n = !0; + return n; + }, e.prototype._whitespace = function() { + var t = this.stream.advanceWhileChar(function(n) { + return n === Yn || n === Kn || n === gt || n === Pt || n === bt; }); - return n > 0; - }; - Scanner2.prototype._name = function(result) { - var matched = false; - while (this._identChar(result) || this._escape(result)) { - matched = true; - } - return matched; - }; - Scanner2.prototype.ident = function(result) { - var pos = this.stream.pos(); - var hasMinus = this._minus(result); - if (hasMinus) { - if (this._minus(result) || this._identFirstChar(result) || this._escape(result)) { - while (this._identChar(result) || this._escape(result)) { - } - return true; + return t > 0; + }, e.prototype._name = function(t) { + for (var n = !1; this._identChar(t) || this._escape(t); ) + n = !0; + return n; + }, e.prototype.ident = function(t) { + var n = this.stream.pos(), r = this._minus(t); + if (r) { + if (this._minus(t) || this._identFirstChar(t) || this._escape(t)) { + for (; this._identChar(t) || this._escape(t); ) + ; + return !0; } - } else if (this._identFirstChar(result) || this._escape(result)) { - while (this._identChar(result) || this._escape(result)) { - } - return true; + } else if (this._identFirstChar(t) || this._escape(t)) { + for (; this._identChar(t) || this._escape(t); ) + ; + return !0; } - this.stream.goBackTo(pos); - return false; - }; - Scanner2.prototype._identFirstChar = function(result) { - var ch = this.stream.peekChar(); - if (ch === _USC || ch >= _a && ch <= _z || ch >= _A && ch <= _Z || ch >= 128 && ch <= 65535) { - this.stream.advance(1); - result.push(String.fromCharCode(ch)); - return true; - } - return false; - }; - Scanner2.prototype._minus = function(result) { - var ch = this.stream.peekChar(); - if (ch === _MIN) { - this.stream.advance(1); - result.push(String.fromCharCode(ch)); - return true; - } - return false; - }; - Scanner2.prototype._identChar = function(result) { - var ch = this.stream.peekChar(); - if (ch === _USC || ch === _MIN || ch >= _a && ch <= _z || ch >= _A && ch <= _Z || ch >= _0 && ch <= _9 || ch >= 128 && ch <= 65535) { - this.stream.advance(1); - result.push(String.fromCharCode(ch)); - return true; - } - return false; - }; - return Scanner2; + return this.stream.goBackTo(n), !1; + }, e.prototype._identFirstChar = function(t) { + var n = this.stream.peekChar(); + return n === Ea || n >= Hn && n <= _a || n >= Gn && n <= Da || n >= 128 && n <= 65535 ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; + }, e.prototype._minus = function(t) { + var n = this.stream.peekChar(); + return n === mt ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; + }, e.prototype._identChar = function(t) { + var n = this.stream.peekChar(); + return n === Ea || n === mt || n >= Hn && n <= _a || n >= Gn && n <= Da || n >= sn && n <= on || n >= 128 && n <= 65535 ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; + }, e; }(); -function startsWith(haystack, needle) { - if (haystack.length < needle.length) { - return false; - } - for (var i = 0; i < needle.length; i++) { - if (haystack[i] !== needle[i]) { - return false; - } - } - return true; +function oe(e, t) { + if (e.length < t.length) + return !1; + for (var n = 0; n < t.length; n++) + if (e[n] !== t[n]) + return !1; + return !0; } -function endsWith(haystack, needle) { - var diff = haystack.length - needle.length; - if (diff > 0) { - return haystack.lastIndexOf(needle) === diff; - } else if (diff === 0) { - return haystack === needle; - } else { - return false; - } +function oo(e, t) { + var n = e.length - t.length; + return n > 0 ? e.lastIndexOf(t) === n : n === 0 ? e === t : !1; } -function difference(first, second, maxLenDelta) { - if (maxLenDelta === void 0) { - maxLenDelta = 4; - } - var lengthDifference = Math.abs(first.length - second.length); - if (lengthDifference > maxLenDelta) { +function zc(e, t, n) { + n === void 0 && (n = 4); + var r = Math.abs(e.length - t.length); + if (r > n) return 0; - } - var LCS = []; - var zeroArray = []; - var i, j; - for (i = 0; i < second.length + 1; ++i) { - zeroArray.push(0); - } - for (i = 0; i < first.length + 1; ++i) { - LCS.push(zeroArray); - } - for (i = 1; i < first.length + 1; ++i) { - for (j = 1; j < second.length + 1; ++j) { - if (first[i - 1] === second[j - 1]) { - LCS[i][j] = LCS[i - 1][j - 1] + 1; - } else { - LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]); - } - } - } - return LCS[first.length][second.length] - Math.sqrt(lengthDifference); + var i = [], a = [], o, l; + for (o = 0; o < t.length + 1; ++o) + a.push(0); + for (o = 0; o < e.length + 1; ++o) + i.push(a); + for (o = 1; o < e.length + 1; ++o) + for (l = 1; l < t.length + 1; ++l) + e[o - 1] === t[l - 1] ? i[o][l] = i[o - 1][l - 1] + 1 : i[o][l] = Math.max(i[o - 1][l], i[o][l - 1]); + return i[e.length][t.length] - Math.sqrt(r); } -function getLimitedString(str, ellipsis) { - if (ellipsis === void 0) { - ellipsis = true; - } - if (!str) { - return ""; - } - if (str.length < 140) { - return str; - } - return str.slice(0, 140) + (ellipsis ? "\u2026" : ""); +function Pa(e, t) { + return t === void 0 && (t = !0), e ? e.length < 140 ? e : e.slice(0, 140) + (t ? "\u2026" : "") : ""; } -function trim(str, regexp) { - var m = regexp.exec(str); - if (m && m[0].length) { - return str.substr(0, str.length - m[0].length); - } - return str; +function Mc(e, t) { + var n = t.exec(e); + return n && n[0].length ? e.substr(0, e.length - n[0].length) : e; } -var __extends = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); +var I = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(); -var NodeType; -(function(NodeType2) { - NodeType2[NodeType2["Undefined"] = 0] = "Undefined"; - NodeType2[NodeType2["Identifier"] = 1] = "Identifier"; - NodeType2[NodeType2["Stylesheet"] = 2] = "Stylesheet"; - NodeType2[NodeType2["Ruleset"] = 3] = "Ruleset"; - NodeType2[NodeType2["Selector"] = 4] = "Selector"; - NodeType2[NodeType2["SimpleSelector"] = 5] = "SimpleSelector"; - NodeType2[NodeType2["SelectorInterpolation"] = 6] = "SelectorInterpolation"; - NodeType2[NodeType2["SelectorCombinator"] = 7] = "SelectorCombinator"; - NodeType2[NodeType2["SelectorCombinatorParent"] = 8] = "SelectorCombinatorParent"; - NodeType2[NodeType2["SelectorCombinatorSibling"] = 9] = "SelectorCombinatorSibling"; - NodeType2[NodeType2["SelectorCombinatorAllSiblings"] = 10] = "SelectorCombinatorAllSiblings"; - NodeType2[NodeType2["SelectorCombinatorShadowPiercingDescendant"] = 11] = "SelectorCombinatorShadowPiercingDescendant"; - NodeType2[NodeType2["Page"] = 12] = "Page"; - NodeType2[NodeType2["PageBoxMarginBox"] = 13] = "PageBoxMarginBox"; - NodeType2[NodeType2["ClassSelector"] = 14] = "ClassSelector"; - NodeType2[NodeType2["IdentifierSelector"] = 15] = "IdentifierSelector"; - NodeType2[NodeType2["ElementNameSelector"] = 16] = "ElementNameSelector"; - NodeType2[NodeType2["PseudoSelector"] = 17] = "PseudoSelector"; - NodeType2[NodeType2["AttributeSelector"] = 18] = "AttributeSelector"; - NodeType2[NodeType2["Declaration"] = 19] = "Declaration"; - NodeType2[NodeType2["Declarations"] = 20] = "Declarations"; - NodeType2[NodeType2["Property"] = 21] = "Property"; - NodeType2[NodeType2["Expression"] = 22] = "Expression"; - NodeType2[NodeType2["BinaryExpression"] = 23] = "BinaryExpression"; - NodeType2[NodeType2["Term"] = 24] = "Term"; - NodeType2[NodeType2["Operator"] = 25] = "Operator"; - NodeType2[NodeType2["Value"] = 26] = "Value"; - NodeType2[NodeType2["StringLiteral"] = 27] = "StringLiteral"; - NodeType2[NodeType2["URILiteral"] = 28] = "URILiteral"; - NodeType2[NodeType2["EscapedValue"] = 29] = "EscapedValue"; - NodeType2[NodeType2["Function"] = 30] = "Function"; - NodeType2[NodeType2["NumericValue"] = 31] = "NumericValue"; - NodeType2[NodeType2["HexColorValue"] = 32] = "HexColorValue"; - NodeType2[NodeType2["RatioValue"] = 33] = "RatioValue"; - NodeType2[NodeType2["MixinDeclaration"] = 34] = "MixinDeclaration"; - NodeType2[NodeType2["MixinReference"] = 35] = "MixinReference"; - NodeType2[NodeType2["VariableName"] = 36] = "VariableName"; - NodeType2[NodeType2["VariableDeclaration"] = 37] = "VariableDeclaration"; - NodeType2[NodeType2["Prio"] = 38] = "Prio"; - NodeType2[NodeType2["Interpolation"] = 39] = "Interpolation"; - NodeType2[NodeType2["NestedProperties"] = 40] = "NestedProperties"; - NodeType2[NodeType2["ExtendsReference"] = 41] = "ExtendsReference"; - NodeType2[NodeType2["SelectorPlaceholder"] = 42] = "SelectorPlaceholder"; - NodeType2[NodeType2["Debug"] = 43] = "Debug"; - NodeType2[NodeType2["If"] = 44] = "If"; - NodeType2[NodeType2["Else"] = 45] = "Else"; - NodeType2[NodeType2["For"] = 46] = "For"; - NodeType2[NodeType2["Each"] = 47] = "Each"; - NodeType2[NodeType2["While"] = 48] = "While"; - NodeType2[NodeType2["MixinContentReference"] = 49] = "MixinContentReference"; - NodeType2[NodeType2["MixinContentDeclaration"] = 50] = "MixinContentDeclaration"; - NodeType2[NodeType2["Media"] = 51] = "Media"; - NodeType2[NodeType2["Keyframe"] = 52] = "Keyframe"; - NodeType2[NodeType2["FontFace"] = 53] = "FontFace"; - NodeType2[NodeType2["Import"] = 54] = "Import"; - NodeType2[NodeType2["Namespace"] = 55] = "Namespace"; - NodeType2[NodeType2["Invocation"] = 56] = "Invocation"; - NodeType2[NodeType2["FunctionDeclaration"] = 57] = "FunctionDeclaration"; - NodeType2[NodeType2["ReturnStatement"] = 58] = "ReturnStatement"; - NodeType2[NodeType2["MediaQuery"] = 59] = "MediaQuery"; - NodeType2[NodeType2["MediaCondition"] = 60] = "MediaCondition"; - NodeType2[NodeType2["MediaFeature"] = 61] = "MediaFeature"; - NodeType2[NodeType2["FunctionParameter"] = 62] = "FunctionParameter"; - NodeType2[NodeType2["FunctionArgument"] = 63] = "FunctionArgument"; - NodeType2[NodeType2["KeyframeSelector"] = 64] = "KeyframeSelector"; - NodeType2[NodeType2["ViewPort"] = 65] = "ViewPort"; - NodeType2[NodeType2["Document"] = 66] = "Document"; - NodeType2[NodeType2["AtApplyRule"] = 67] = "AtApplyRule"; - NodeType2[NodeType2["CustomPropertyDeclaration"] = 68] = "CustomPropertyDeclaration"; - NodeType2[NodeType2["CustomPropertySet"] = 69] = "CustomPropertySet"; - NodeType2[NodeType2["ListEntry"] = 70] = "ListEntry"; - NodeType2[NodeType2["Supports"] = 71] = "Supports"; - NodeType2[NodeType2["SupportsCondition"] = 72] = "SupportsCondition"; - NodeType2[NodeType2["NamespacePrefix"] = 73] = "NamespacePrefix"; - NodeType2[NodeType2["GridLine"] = 74] = "GridLine"; - NodeType2[NodeType2["Plugin"] = 75] = "Plugin"; - NodeType2[NodeType2["UnknownAtRule"] = 76] = "UnknownAtRule"; - NodeType2[NodeType2["Use"] = 77] = "Use"; - NodeType2[NodeType2["ModuleConfiguration"] = 78] = "ModuleConfiguration"; - NodeType2[NodeType2["Forward"] = 79] = "Forward"; - NodeType2[NodeType2["ForwardVisibility"] = 80] = "ForwardVisibility"; - NodeType2[NodeType2["Module"] = 81] = "Module"; -})(NodeType || (NodeType = {})); -var ReferenceType; -(function(ReferenceType2) { - ReferenceType2[ReferenceType2["Mixin"] = 0] = "Mixin"; - ReferenceType2[ReferenceType2["Rule"] = 1] = "Rule"; - ReferenceType2[ReferenceType2["Variable"] = 2] = "Variable"; - ReferenceType2[ReferenceType2["Function"] = 3] = "Function"; - ReferenceType2[ReferenceType2["Keyframe"] = 4] = "Keyframe"; - ReferenceType2[ReferenceType2["Unknown"] = 5] = "Unknown"; - ReferenceType2[ReferenceType2["Module"] = 6] = "Module"; - ReferenceType2[ReferenceType2["Forward"] = 7] = "Forward"; - ReferenceType2[ReferenceType2["ForwardVisibility"] = 8] = "ForwardVisibility"; -})(ReferenceType || (ReferenceType = {})); -function getNodeAtOffset(node, offset) { - var candidate = null; - if (!node || offset < node.offset || offset > node.end) { - return null; - } - node.accept(function(node2) { - if (node2.offset === -1 && node2.length === -1) { - return true; - } - if (node2.offset <= offset && node2.end >= offset) { - if (!candidate) { - candidate = node2; - } else if (node2.length <= candidate.length) { - candidate = node2; - } - return true; - } - return false; - }); - return candidate; +}(), m; +(function(e) { + e[e.Undefined = 0] = "Undefined", e[e.Identifier = 1] = "Identifier", e[e.Stylesheet = 2] = "Stylesheet", e[e.Ruleset = 3] = "Ruleset", e[e.Selector = 4] = "Selector", e[e.SimpleSelector = 5] = "SimpleSelector", e[e.SelectorInterpolation = 6] = "SelectorInterpolation", e[e.SelectorCombinator = 7] = "SelectorCombinator", e[e.SelectorCombinatorParent = 8] = "SelectorCombinatorParent", e[e.SelectorCombinatorSibling = 9] = "SelectorCombinatorSibling", e[e.SelectorCombinatorAllSiblings = 10] = "SelectorCombinatorAllSiblings", e[e.SelectorCombinatorShadowPiercingDescendant = 11] = "SelectorCombinatorShadowPiercingDescendant", e[e.Page = 12] = "Page", e[e.PageBoxMarginBox = 13] = "PageBoxMarginBox", e[e.ClassSelector = 14] = "ClassSelector", e[e.IdentifierSelector = 15] = "IdentifierSelector", e[e.ElementNameSelector = 16] = "ElementNameSelector", e[e.PseudoSelector = 17] = "PseudoSelector", e[e.AttributeSelector = 18] = "AttributeSelector", e[e.Declaration = 19] = "Declaration", e[e.Declarations = 20] = "Declarations", e[e.Property = 21] = "Property", e[e.Expression = 22] = "Expression", e[e.BinaryExpression = 23] = "BinaryExpression", e[e.Term = 24] = "Term", e[e.Operator = 25] = "Operator", e[e.Value = 26] = "Value", e[e.StringLiteral = 27] = "StringLiteral", e[e.URILiteral = 28] = "URILiteral", e[e.EscapedValue = 29] = "EscapedValue", e[e.Function = 30] = "Function", e[e.NumericValue = 31] = "NumericValue", e[e.HexColorValue = 32] = "HexColorValue", e[e.RatioValue = 33] = "RatioValue", e[e.MixinDeclaration = 34] = "MixinDeclaration", e[e.MixinReference = 35] = "MixinReference", e[e.VariableName = 36] = "VariableName", e[e.VariableDeclaration = 37] = "VariableDeclaration", e[e.Prio = 38] = "Prio", e[e.Interpolation = 39] = "Interpolation", e[e.NestedProperties = 40] = "NestedProperties", e[e.ExtendsReference = 41] = "ExtendsReference", e[e.SelectorPlaceholder = 42] = "SelectorPlaceholder", e[e.Debug = 43] = "Debug", e[e.If = 44] = "If", e[e.Else = 45] = "Else", e[e.For = 46] = "For", e[e.Each = 47] = "Each", e[e.While = 48] = "While", e[e.MixinContentReference = 49] = "MixinContentReference", e[e.MixinContentDeclaration = 50] = "MixinContentDeclaration", e[e.Media = 51] = "Media", e[e.Keyframe = 52] = "Keyframe", e[e.FontFace = 53] = "FontFace", e[e.Import = 54] = "Import", e[e.Namespace = 55] = "Namespace", e[e.Invocation = 56] = "Invocation", e[e.FunctionDeclaration = 57] = "FunctionDeclaration", e[e.ReturnStatement = 58] = "ReturnStatement", e[e.MediaQuery = 59] = "MediaQuery", e[e.MediaCondition = 60] = "MediaCondition", e[e.MediaFeature = 61] = "MediaFeature", e[e.FunctionParameter = 62] = "FunctionParameter", e[e.FunctionArgument = 63] = "FunctionArgument", e[e.KeyframeSelector = 64] = "KeyframeSelector", e[e.ViewPort = 65] = "ViewPort", e[e.Document = 66] = "Document", e[e.AtApplyRule = 67] = "AtApplyRule", e[e.CustomPropertyDeclaration = 68] = "CustomPropertyDeclaration", e[e.CustomPropertySet = 69] = "CustomPropertySet", e[e.ListEntry = 70] = "ListEntry", e[e.Supports = 71] = "Supports", e[e.SupportsCondition = 72] = "SupportsCondition", e[e.NamespacePrefix = 73] = "NamespacePrefix", e[e.GridLine = 74] = "GridLine", e[e.Plugin = 75] = "Plugin", e[e.UnknownAtRule = 76] = "UnknownAtRule", e[e.Use = 77] = "Use", e[e.ModuleConfiguration = 78] = "ModuleConfiguration", e[e.Forward = 79] = "Forward", e[e.ForwardVisibility = 80] = "ForwardVisibility", e[e.Module = 81] = "Module"; +})(m || (m = {})); +var G; +(function(e) { + e[e.Mixin = 0] = "Mixin", e[e.Rule = 1] = "Rule", e[e.Variable = 2] = "Variable", e[e.Function = 3] = "Function", e[e.Keyframe = 4] = "Keyframe", e[e.Unknown = 5] = "Unknown", e[e.Module = 6] = "Module", e[e.Forward = 7] = "Forward", e[e.ForwardVisibility = 8] = "ForwardVisibility"; +})(G || (G = {})); +function Rr(e, t) { + var n = null; + return !e || t < e.offset || t > e.end ? null : (e.accept(function(r) { + return r.offset === -1 && r.length === -1 ? !0 : r.offset <= t && r.end >= t ? (n ? r.length <= n.length && (n = r) : n = r, !0) : !1; + }), n); } -function getNodePath(node, offset) { - var candidate = getNodeAtOffset(node, offset); - var path = []; - while (candidate) { - path.unshift(candidate); - candidate = candidate.parent; - } - return path; +function ei(e, t) { + for (var n = Rr(e, t), r = []; n; ) + r.unshift(n), n = n.parent; + return r; } -function getParentDeclaration(node) { - var decl = node.findParent(NodeType.Declaration); - var value = decl && decl.getValue(); - if (value && value.encloses(node)) { - return decl; - } - return null; +function Nc(e) { + var t = e.findParent(m.Declaration), n = t && t.getValue(); + return n && n.encloses(e) ? t : null; } -var Node = function() { - function Node2(offset, len, nodeType) { - if (offset === void 0) { - offset = -1; - } - if (len === void 0) { - len = -1; - } - this.parent = null; - this.offset = offset; - this.length = len; - if (nodeType) { - this.nodeType = nodeType; - } +var L = function() { + function e(t, n, r) { + t === void 0 && (t = -1), n === void 0 && (n = -1), this.parent = null, this.offset = t, this.length = n, r && (this.nodeType = r); } - Object.defineProperty(Node2.prototype, "end", { + return Object.defineProperty(e.prototype, "end", { get: function() { return this.offset + this.length; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Node2.prototype, "type", { + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "type", { get: function() { - return this.nodeType || NodeType.Undefined; + return this.nodeType || m.Undefined; }, - set: function(type) { - this.nodeType = type; + set: function(t) { + this.nodeType = t; }, - enumerable: false, - configurable: true - }); - Node2.prototype.getTextProvider = function() { - var node = this; - while (node && !node.textProvider) { - node = node.parent; - } - if (node) { - return node.textProvider; - } - return function() { + enumerable: !1, + configurable: !0 + }), e.prototype.getTextProvider = function() { + for (var t = this; t && !t.textProvider; ) + t = t.parent; + return t ? t.textProvider : function() { return "unknown"; }; - }; - Node2.prototype.getText = function() { + }, e.prototype.getText = function() { return this.getTextProvider()(this.offset, this.length); - }; - Node2.prototype.matches = function(str) { - return this.length === str.length && this.getTextProvider()(this.offset, this.length) === str; - }; - Node2.prototype.startsWith = function(str) { - return this.length >= str.length && this.getTextProvider()(this.offset, str.length) === str; - }; - Node2.prototype.endsWith = function(str) { - return this.length >= str.length && this.getTextProvider()(this.end - str.length, str.length) === str; - }; - Node2.prototype.accept = function(visitor) { - if (visitor(this) && this.children) { - for (var _i = 0, _a2 = this.children; _i < _a2.length; _i++) { - var child = _a2[_i]; - child.accept(visitor); + }, e.prototype.matches = function(t) { + return this.length === t.length && this.getTextProvider()(this.offset, this.length) === t; + }, e.prototype.startsWith = function(t) { + return this.length >= t.length && this.getTextProvider()(this.offset, t.length) === t; + }, e.prototype.endsWith = function(t) { + return this.length >= t.length && this.getTextProvider()(this.end - t.length, t.length) === t; + }, e.prototype.accept = function(t) { + if (t(this) && this.children) + for (var n = 0, r = this.children; n < r.length; n++) { + var i = r[n]; + i.accept(t); } + }, e.prototype.acceptVisitor = function(t) { + this.accept(t.visitNode.bind(t)); + }, e.prototype.adoptChild = function(t, n) { + if (n === void 0 && (n = -1), t.parent && t.parent.children) { + var r = t.parent.children.indexOf(t); + r >= 0 && t.parent.children.splice(r, 1); } - }; - Node2.prototype.acceptVisitor = function(visitor) { - this.accept(visitor.visitNode.bind(visitor)); - }; - Node2.prototype.adoptChild = function(node, index) { - if (index === void 0) { - index = -1; - } - if (node.parent && node.parent.children) { - var idx = node.parent.children.indexOf(node); - if (idx >= 0) { - node.parent.children.splice(idx, 1); - } - } - node.parent = this; - var children = this.children; - if (!children) { - children = this.children = []; - } - if (index !== -1) { - children.splice(index, 0, node); - } else { - children.push(node); - } - return node; - }; - Node2.prototype.attachTo = function(parent, index) { - if (index === void 0) { - index = -1; - } - if (parent) { - parent.adoptChild(this, index); - } - return this; - }; - Node2.prototype.collectIssues = function(results) { - if (this.issues) { - results.push.apply(results, this.issues); - } - }; - Node2.prototype.addIssue = function(issue) { - if (!this.issues) { - this.issues = []; - } - this.issues.push(issue); - }; - Node2.prototype.hasIssue = function(rule) { - return Array.isArray(this.issues) && this.issues.some(function(i) { - return i.getRule() === rule; + t.parent = this; + var i = this.children; + return i || (i = this.children = []), n !== -1 ? i.splice(n, 0, t) : i.push(t), t; + }, e.prototype.attachTo = function(t, n) { + return n === void 0 && (n = -1), t && t.adoptChild(this, n), this; + }, e.prototype.collectIssues = function(t) { + this.issues && t.push.apply(t, this.issues); + }, e.prototype.addIssue = function(t) { + this.issues || (this.issues = []), this.issues.push(t); + }, e.prototype.hasIssue = function(t) { + return Array.isArray(this.issues) && this.issues.some(function(n) { + return n.getRule() === t; }); - }; - Node2.prototype.isErroneous = function(recursive) { - if (recursive === void 0) { - recursive = false; - } - if (this.issues && this.issues.length > 0) { - return true; - } - return recursive && Array.isArray(this.children) && this.children.some(function(c) { - return c.isErroneous(true); + }, e.prototype.isErroneous = function(t) { + return t === void 0 && (t = !1), this.issues && this.issues.length > 0 ? !0 : t && Array.isArray(this.children) && this.children.some(function(n) { + return n.isErroneous(!0); }); - }; - Node2.prototype.setNode = function(field, node, index) { - if (index === void 0) { - index = -1; - } - if (node) { - node.attachTo(this, index); - this[field] = node; - return true; - } - return false; - }; - Node2.prototype.addChild = function(node) { - if (node) { - if (!this.children) { - this.children = []; - } - node.attachTo(this); - this.updateOffsetAndLength(node); - return true; - } - return false; - }; - Node2.prototype.updateOffsetAndLength = function(node) { - if (node.offset < this.offset || this.offset === -1) { - this.offset = node.offset; - } - var nodeEnd = node.end; - if (nodeEnd > this.end || this.length === -1) { - this.length = nodeEnd - this.offset; - } - }; - Node2.prototype.hasChildren = function() { + }, e.prototype.setNode = function(t, n, r) { + return r === void 0 && (r = -1), n ? (n.attachTo(this, r), this[t] = n, !0) : !1; + }, e.prototype.addChild = function(t) { + return t ? (this.children || (this.children = []), t.attachTo(this), this.updateOffsetAndLength(t), !0) : !1; + }, e.prototype.updateOffsetAndLength = function(t) { + (t.offset < this.offset || this.offset === -1) && (this.offset = t.offset); + var n = t.end; + (n > this.end || this.length === -1) && (this.length = n - this.offset); + }, e.prototype.hasChildren = function() { return !!this.children && this.children.length > 0; - }; - Node2.prototype.getChildren = function() { + }, e.prototype.getChildren = function() { return this.children ? this.children.slice(0) : []; - }; - Node2.prototype.getChild = function(index) { - if (this.children && index < this.children.length) { - return this.children[index]; + }, e.prototype.getChild = function(t) { + return this.children && t < this.children.length ? this.children[t] : null; + }, e.prototype.addChildren = function(t) { + for (var n = 0, r = t; n < r.length; n++) { + var i = r[n]; + this.addChild(i); } - return null; - }; - Node2.prototype.addChildren = function(nodes) { - for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { - var node = nodes_1[_i]; - this.addChild(node); - } - }; - Node2.prototype.findFirstChildBeforeOffset = function(offset) { + }, e.prototype.findFirstChildBeforeOffset = function(t) { if (this.children) { - var current = null; - for (var i = this.children.length - 1; i >= 0; i--) { - current = this.children[i]; - if (current.offset <= offset) { - return current; - } - } + for (var n = null, r = this.children.length - 1; r >= 0; r--) + if (n = this.children[r], n.offset <= t) + return n; } return null; - }; - Node2.prototype.findChildAtOffset = function(offset, goDeep) { - var current = this.findFirstChildBeforeOffset(offset); - if (current && current.end >= offset) { - if (goDeep) { - return current.findChildAtOffset(offset, true) || current; - } - return current; - } - return null; - }; - Node2.prototype.encloses = function(candidate) { - return this.offset <= candidate.offset && this.offset + this.length >= candidate.offset + candidate.length; - }; - Node2.prototype.getParent = function() { - var result = this.parent; - while (result instanceof Nodelist) { - result = result.parent; - } - return result; - }; - Node2.prototype.findParent = function(type) { - var result = this; - while (result && result.type !== type) { - result = result.parent; - } - return result; - }; - Node2.prototype.findAParent = function() { - var types = []; - for (var _i = 0; _i < arguments.length; _i++) { - types[_i] = arguments[_i]; - } - var result = this; - while (result && !types.some(function(t) { - return result.type === t; - })) { - result = result.parent; - } - return result; - }; - Node2.prototype.setData = function(key, value) { - if (!this.options) { - this.options = {}; - } - this.options[key] = value; - }; - Node2.prototype.getData = function(key) { - if (!this.options || !this.options.hasOwnProperty(key)) { - return null; - } - return this.options[key]; - }; - return Node2; -}(); -var Nodelist = function(_super) { - __extends(Nodelist2, _super); - function Nodelist2(parent, index) { - if (index === void 0) { - index = -1; - } - var _this = _super.call(this, -1, -1) || this; - _this.attachTo(parent, index); - _this.offset = -1; - _this.length = -1; - return _this; + }, e.prototype.findChildAtOffset = function(t, n) { + var r = this.findFirstChildBeforeOffset(t); + return r && r.end >= t ? n && r.findChildAtOffset(t, !0) || r : null; + }, e.prototype.encloses = function(t) { + return this.offset <= t.offset && this.offset + this.length >= t.offset + t.length; + }, e.prototype.getParent = function() { + for (var t = this.parent; t instanceof me; ) + t = t.parent; + return t; + }, e.prototype.findParent = function(t) { + for (var n = this; n && n.type !== t; ) + n = n.parent; + return n; + }, e.prototype.findAParent = function() { + for (var t = [], n = 0; n < arguments.length; n++) + t[n] = arguments[n]; + for (var r = this; r && !t.some(function(i) { + return r.type === i; + }); ) + r = r.parent; + return r; + }, e.prototype.setData = function(t, n) { + this.options || (this.options = {}), this.options[t] = n; + }, e.prototype.getData = function(t) { + return !this.options || !this.options.hasOwnProperty(t) ? null : this.options[t]; + }, e; +}(), me = function(e) { + I(t, e); + function t(n, r) { + r === void 0 && (r = -1); + var i = e.call(this, -1, -1) || this; + return i.attachTo(n, r), i.offset = -1, i.length = -1, i; } - return Nodelist2; -}(Node); -var Identifier = function(_super) { - __extends(Identifier2, _super); - function Identifier2(offset, length) { - var _this = _super.call(this, offset, length) || this; - _this.isCustomProperty = false; - return _this; + return t; +}(L), Re = function(e) { + I(t, e); + function t(n, r) { + var i = e.call(this, n, r) || this; + return i.isCustomProperty = !1, i; } - Object.defineProperty(Identifier2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Identifier; + return m.Identifier; }, - enumerable: false, - configurable: true - }); - Identifier2.prototype.containsInterpolation = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.containsInterpolation = function() { return this.hasChildren(); - }; - return Identifier2; -}(Node); -var Stylesheet = function(_super) { - __extends(Stylesheet2, _super); - function Stylesheet2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), Pc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Stylesheet2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Stylesheet; + return m.Stylesheet; }, - enumerable: false, - configurable: true - }); - return Stylesheet2; -}(Node); -var Declarations = function(_super) { - __extends(Declarations2, _super); - function Declarations2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), ti = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Declarations2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Declarations; + return m.Declarations; }, - enumerable: false, - configurable: true - }); - return Declarations2; -}(Node); -var BodyDeclaration = function(_super) { - __extends(BodyDeclaration2, _super); - function BodyDeclaration2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), ne = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - BodyDeclaration2.prototype.getDeclarations = function() { + return t.prototype.getDeclarations = function() { return this.declarations; - }; - BodyDeclaration2.prototype.setDeclarations = function(decls) { - return this.setNode("declarations", decls); - }; - return BodyDeclaration2; -}(Node); -var RuleSet = function(_super) { - __extends(RuleSet2, _super); - function RuleSet2(offset, length) { - return _super.call(this, offset, length) || this; + }, t.prototype.setDeclarations = function(n) { + return this.setNode("declarations", n); + }, t; +}(L), Ct = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(RuleSet2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Ruleset; + return m.Ruleset; }, - enumerable: false, - configurable: true - }); - RuleSet2.prototype.getSelectors = function() { - if (!this.selectors) { - this.selectors = new Nodelist(this); - } - return this.selectors; - }; - RuleSet2.prototype.isNested = function() { - return !!this.parent && this.parent.findParent(NodeType.Declarations) !== null; - }; - return RuleSet2; -}(BodyDeclaration); -var Selector = function(_super) { - __extends(Selector2, _super); - function Selector2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.getSelectors = function() { + return this.selectors || (this.selectors = new me(this)), this.selectors; + }, t.prototype.isNested = function() { + return !!this.parent && this.parent.findParent(m.Declarations) !== null; + }, t; +}(ne), tn = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Selector2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Selector; + return m.Selector; }, - enumerable: false, - configurable: true - }); - return Selector2; -}(Node); -var SimpleSelector = function(_super) { - __extends(SimpleSelector2, _super); - function SimpleSelector2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), kt = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(SimpleSelector2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.SimpleSelector; + return m.SimpleSelector; }, - enumerable: false, - configurable: true - }); - return SimpleSelector2; -}(Node); -(function(_super) { - __extends(AtApplyRule2, _super); - function AtApplyRule2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L); +(function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(AtApplyRule2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.AtApplyRule; + return m.AtApplyRule; }, - enumerable: false, - configurable: true - }); - AtApplyRule2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - AtApplyRule2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - AtApplyRule2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - return AtApplyRule2; -})(Node); -var AbstractDeclaration = function(_super) { - __extends(AbstractDeclaration2, _super); - function AbstractDeclaration2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +})(L); +var ni = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - return AbstractDeclaration2; -}(Node); -var CustomPropertySet = function(_super) { - __extends(CustomPropertySet2, _super); - function CustomPropertySet2(offset, length) { - return _super.call(this, offset, length) || this; + return t; +}(L), Ic = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(CustomPropertySet2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.CustomPropertySet; + return m.CustomPropertySet; }, - enumerable: false, - configurable: true - }); - return CustomPropertySet2; -}(BodyDeclaration); -var Declaration = function(_super) { - __extends(Declaration2, _super); - function Declaration2(offset, length) { - var _this = _super.call(this, offset, length) || this; - _this.property = null; - return _this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), Ve = function(e) { + I(t, e); + function t(n, r) { + var i = e.call(this, n, r) || this; + return i.property = null, i; } - Object.defineProperty(Declaration2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Declaration; + return m.Declaration; }, - enumerable: false, - configurable: true - }); - Declaration2.prototype.setProperty = function(node) { - return this.setNode("property", node); - }; - Declaration2.prototype.getProperty = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setProperty = function(n) { + return this.setNode("property", n); + }, t.prototype.getProperty = function() { return this.property; - }; - Declaration2.prototype.getFullPropertyName = function() { - var propertyName = this.property ? this.property.getName() : "unknown"; - if (this.parent instanceof Declarations && this.parent.getParent() instanceof NestedProperties) { - var parentDecl = this.parent.getParent().getParent(); - if (parentDecl instanceof Declaration2) { - return parentDecl.getFullPropertyName() + propertyName; - } + }, t.prototype.getFullPropertyName = function() { + var n = this.property ? this.property.getName() : "unknown"; + if (this.parent instanceof ti && this.parent.getParent() instanceof co) { + var r = this.parent.getParent().getParent(); + if (r instanceof t) + return r.getFullPropertyName() + n; } - return propertyName; - }; - Declaration2.prototype.getNonPrefixedPropertyName = function() { - var propertyName = this.getFullPropertyName(); - if (propertyName && propertyName.charAt(0) === "-") { - var vendorPrefixEnd = propertyName.indexOf("-", 1); - if (vendorPrefixEnd !== -1) { - return propertyName.substring(vendorPrefixEnd + 1); - } + return n; + }, t.prototype.getNonPrefixedPropertyName = function() { + var n = this.getFullPropertyName(); + if (n && n.charAt(0) === "-") { + var r = n.indexOf("-", 1); + if (r !== -1) + return n.substring(r + 1); } - return propertyName; - }; - Declaration2.prototype.setValue = function(value) { - return this.setNode("value", value); - }; - Declaration2.prototype.getValue = function() { + return n; + }, t.prototype.setValue = function(n) { + return this.setNode("value", n); + }, t.prototype.getValue = function() { return this.value; - }; - Declaration2.prototype.setNestedProperties = function(value) { - return this.setNode("nestedProperties", value); - }; - Declaration2.prototype.getNestedProperties = function() { + }, t.prototype.setNestedProperties = function(n) { + return this.setNode("nestedProperties", n); + }, t.prototype.getNestedProperties = function() { return this.nestedProperties; - }; - return Declaration2; -}(AbstractDeclaration); -var CustomPropertyDeclaration = function(_super) { - __extends(CustomPropertyDeclaration2, _super); - function CustomPropertyDeclaration2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(ni), Lc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(CustomPropertyDeclaration2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.CustomPropertyDeclaration; + return m.CustomPropertyDeclaration; }, - enumerable: false, - configurable: true - }); - CustomPropertyDeclaration2.prototype.setPropertySet = function(value) { - return this.setNode("propertySet", value); - }; - CustomPropertyDeclaration2.prototype.getPropertySet = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setPropertySet = function(n) { + return this.setNode("propertySet", n); + }, t.prototype.getPropertySet = function() { return this.propertySet; - }; - return CustomPropertyDeclaration2; -}(Declaration); -var Property = function(_super) { - __extends(Property2, _super); - function Property2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(Ve), ri = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Property2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Property; + return m.Property; }, - enumerable: false, - configurable: true - }); - Property2.prototype.setIdentifier = function(value) { - return this.setNode("identifier", value); - }; - Property2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - Property2.prototype.getName = function() { - return trim(this.getText(), /[_\+]+$/); - }; - Property2.prototype.isCustomProperty = function() { + }, t.prototype.getName = function() { + return Mc(this.getText(), /[_\+]+$/); + }, t.prototype.isCustomProperty = function() { return !!this.identifier && this.identifier.isCustomProperty; - }; - return Property2; -}(Node); -var Invocation = function(_super) { - __extends(Invocation2, _super); - function Invocation2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), Tc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Invocation2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Invocation; + return m.Invocation; }, - enumerable: false, - configurable: true - }); - Invocation2.prototype.getArguments = function() { - if (!this.arguments) { - this.arguments = new Nodelist(this); - } - return this.arguments; - }; - return Invocation2; -}(Node); -var Function = function(_super) { - __extends(Function2, _super); - function Function2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.getArguments = function() { + return this.arguments || (this.arguments = new me(this)), this.arguments; + }, t; +}(L), nn = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Function2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Function; + return m.Function; }, - enumerable: false, - configurable: true - }); - Function2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - Function2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - Function2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - return Function2; -}(Invocation); -var FunctionParameter = function(_super) { - __extends(FunctionParameter2, _super); - function FunctionParameter2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(Tc), On = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(FunctionParameter2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.FunctionParameter; + return m.FunctionParameter; }, - enumerable: false, - configurable: true - }); - FunctionParameter2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - FunctionParameter2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - FunctionParameter2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - FunctionParameter2.prototype.setDefaultValue = function(node) { - return this.setNode("defaultValue", node, 0); - }; - FunctionParameter2.prototype.getDefaultValue = function() { + }, t.prototype.setDefaultValue = function(n) { + return this.setNode("defaultValue", n, 0); + }, t.prototype.getDefaultValue = function() { return this.defaultValue; - }; - return FunctionParameter2; -}(Node); -var FunctionArgument = function(_super) { - __extends(FunctionArgument2, _super); - function FunctionArgument2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), Dt = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(FunctionArgument2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.FunctionArgument; + return m.FunctionArgument; }, - enumerable: false, - configurable: true - }); - FunctionArgument2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - FunctionArgument2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - FunctionArgument2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - FunctionArgument2.prototype.setValue = function(node) { - return this.setNode("value", node, 0); - }; - FunctionArgument2.prototype.getValue = function() { + }, t.prototype.setValue = function(n) { + return this.setNode("value", n, 0); + }, t.prototype.getValue = function() { return this.value; - }; - return FunctionArgument2; -}(Node); -var IfStatement = function(_super) { - __extends(IfStatement2, _super); - function IfStatement2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), Wc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(IfStatement2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.If; + return m.If; }, - enumerable: false, - configurable: true - }); - IfStatement2.prototype.setExpression = function(node) { - return this.setNode("expression", node, 0); - }; - IfStatement2.prototype.setElseClause = function(elseClause) { - return this.setNode("elseClause", elseClause); - }; - return IfStatement2; -}(BodyDeclaration); -var ForStatement = function(_super) { - __extends(ForStatement2, _super); - function ForStatement2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.setExpression = function(n) { + return this.setNode("expression", n, 0); + }, t.prototype.setElseClause = function(n) { + return this.setNode("elseClause", n); + }, t; +}(ne), Oc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(ForStatement2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.For; + return m.For; }, - enumerable: false, - configurable: true - }); - ForStatement2.prototype.setVariable = function(node) { - return this.setNode("variable", node, 0); - }; - return ForStatement2; -}(BodyDeclaration); -var EachStatement = function(_super) { - __extends(EachStatement2, _super); - function EachStatement2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.setVariable = function(n) { + return this.setNode("variable", n, 0); + }, t; +}(ne), Vc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(EachStatement2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Each; + return m.Each; }, - enumerable: false, - configurable: true - }); - EachStatement2.prototype.getVariables = function() { - if (!this.variables) { - this.variables = new Nodelist(this); - } - return this.variables; - }; - return EachStatement2; -}(BodyDeclaration); -var WhileStatement = function(_super) { - __extends(WhileStatement2, _super); - function WhileStatement2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.getVariables = function() { + return this.variables || (this.variables = new me(this)), this.variables; + }, t; +}(ne), Uc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(WhileStatement2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.While; + return m.While; }, - enumerable: false, - configurable: true - }); - return WhileStatement2; -}(BodyDeclaration); -var ElseStatement = function(_super) { - __extends(ElseStatement2, _super); - function ElseStatement2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), Bc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(ElseStatement2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Else; + return m.Else; }, - enumerable: false, - configurable: true - }); - return ElseStatement2; -}(BodyDeclaration); -var FunctionDeclaration = function(_super) { - __extends(FunctionDeclaration2, _super); - function FunctionDeclaration2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), kn = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(FunctionDeclaration2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.FunctionDeclaration; + return m.FunctionDeclaration; }, - enumerable: false, - configurable: true - }); - FunctionDeclaration2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - FunctionDeclaration2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - FunctionDeclaration2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - FunctionDeclaration2.prototype.getParameters = function() { - if (!this.parameters) { - this.parameters = new Nodelist(this); - } - return this.parameters; - }; - return FunctionDeclaration2; -}(BodyDeclaration); -var ViewPort = function(_super) { - __extends(ViewPort2, _super); - function ViewPort2(offset, length) { - return _super.call(this, offset, length) || this; + }, t.prototype.getParameters = function() { + return this.parameters || (this.parameters = new me(this)), this.parameters; + }, t; +}(ne), jc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(ViewPort2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.ViewPort; + return m.ViewPort; }, - enumerable: false, - configurable: true - }); - return ViewPort2; -}(BodyDeclaration); -var FontFace = function(_super) { - __extends(FontFace2, _super); - function FontFace2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), lo = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(FontFace2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.FontFace; + return m.FontFace; }, - enumerable: false, - configurable: true - }); - return FontFace2; -}(BodyDeclaration); -var NestedProperties = function(_super) { - __extends(NestedProperties2, _super); - function NestedProperties2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), co = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(NestedProperties2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.NestedProperties; + return m.NestedProperties; }, - enumerable: false, - configurable: true - }); - return NestedProperties2; -}(BodyDeclaration); -var Keyframe = function(_super) { - __extends(Keyframe2, _super); - function Keyframe2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), ho = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Keyframe2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Keyframe; + return m.Keyframe; }, - enumerable: false, - configurable: true - }); - Keyframe2.prototype.setKeyword = function(keyword) { - return this.setNode("keyword", keyword, 0); - }; - Keyframe2.prototype.getKeyword = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setKeyword = function(n) { + return this.setNode("keyword", n, 0); + }, t.prototype.getKeyword = function() { return this.keyword; - }; - Keyframe2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - Keyframe2.prototype.getIdentifier = function() { + }, t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - Keyframe2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - return Keyframe2; -}(BodyDeclaration); -var KeyframeSelector = function(_super) { - __extends(KeyframeSelector2, _super); - function KeyframeSelector2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(ne), Ia = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(KeyframeSelector2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.KeyframeSelector; + return m.KeyframeSelector; }, - enumerable: false, - configurable: true - }); - return KeyframeSelector2; -}(BodyDeclaration); -var Import = function(_super) { - __extends(Import2, _super); - function Import2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), ii = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Import2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Import; + return m.Import; }, - enumerable: false, - configurable: true - }); - Import2.prototype.setMedialist = function(node) { - if (node) { - node.attachTo(this); - return true; - } - return false; - }; - return Import2; -}(Node); -var Use = function(_super) { - __extends(Use2, _super); - function Use2() { - return _super !== null && _super.apply(this, arguments) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.setMedialist = function(n) { + return n ? (n.attachTo(this), !0) : !1; + }, t; +}(L), qc = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - Object.defineProperty(Use2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Use; + return m.Use; }, - enumerable: false, - configurable: true - }); - Use2.prototype.getParameters = function() { - if (!this.parameters) { - this.parameters = new Nodelist(this); - } - return this.parameters; - }; - Use2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - Use2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.getParameters = function() { + return this.parameters || (this.parameters = new me(this)), this.parameters; + }, t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - return Use2; -}(Node); -var ModuleConfiguration = function(_super) { - __extends(ModuleConfiguration2, _super); - function ModuleConfiguration2() { - return _super !== null && _super.apply(this, arguments) || this; + }, t; +}(L), $c = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - Object.defineProperty(ModuleConfiguration2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.ModuleConfiguration; + return m.ModuleConfiguration; }, - enumerable: false, - configurable: true - }); - ModuleConfiguration2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - ModuleConfiguration2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - ModuleConfiguration2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - ModuleConfiguration2.prototype.setValue = function(node) { - return this.setNode("value", node, 0); - }; - ModuleConfiguration2.prototype.getValue = function() { + }, t.prototype.setValue = function(n) { + return this.setNode("value", n, 0); + }, t.prototype.getValue = function() { return this.value; - }; - return ModuleConfiguration2; -}(Node); -var Forward = function(_super) { - __extends(Forward2, _super); - function Forward2() { - return _super !== null && _super.apply(this, arguments) || this; + }, t; +}(L), Hc = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - Object.defineProperty(Forward2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Forward; + return m.Forward; }, - enumerable: false, - configurable: true - }); - Forward2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - Forward2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - Forward2.prototype.getMembers = function() { - if (!this.members) { - this.members = new Nodelist(this); - } - return this.members; - }; - Forward2.prototype.getParameters = function() { - if (!this.parameters) { - this.parameters = new Nodelist(this); - } - return this.parameters; - }; - return Forward2; -}(Node); -var ForwardVisibility = function(_super) { - __extends(ForwardVisibility2, _super); - function ForwardVisibility2() { - return _super !== null && _super.apply(this, arguments) || this; + }, t.prototype.getMembers = function() { + return this.members || (this.members = new me(this)), this.members; + }, t.prototype.getParameters = function() { + return this.parameters || (this.parameters = new me(this)), this.parameters; + }, t; +}(L), Gc = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - Object.defineProperty(ForwardVisibility2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.ForwardVisibility; + return m.ForwardVisibility; }, - enumerable: false, - configurable: true - }); - ForwardVisibility2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - ForwardVisibility2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - return ForwardVisibility2; -}(Node); -var Namespace = function(_super) { - __extends(Namespace2, _super); - function Namespace2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), Jc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Namespace2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Namespace; + return m.Namespace; }, - enumerable: false, - configurable: true - }); - return Namespace2; -}(Node); -var Media = function(_super) { - __extends(Media2, _super); - function Media2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), uo = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Media2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Media; + return m.Media; }, - enumerable: false, - configurable: true - }); - return Media2; -}(BodyDeclaration); -var Supports = function(_super) { - __extends(Supports2, _super); - function Supports2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), Ar = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Supports2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Supports; + return m.Supports; }, - enumerable: false, - configurable: true - }); - return Supports2; -}(BodyDeclaration); -var Document = function(_super) { - __extends(Document2, _super); - function Document2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), Xc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Document2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Document; + return m.Document; }, - enumerable: false, - configurable: true - }); - return Document2; -}(BodyDeclaration); -var Medialist = function(_super) { - __extends(Medialist2, _super); - function Medialist2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), po = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Medialist2.prototype.getMediums = function() { - if (!this.mediums) { - this.mediums = new Nodelist(this); - } - return this.mediums; - }; - return Medialist2; -}(Node); -var MediaQuery = function(_super) { - __extends(MediaQuery2, _super); - function MediaQuery2(offset, length) { - return _super.call(this, offset, length) || this; + return t.prototype.getMediums = function() { + return this.mediums || (this.mediums = new me(this)), this.mediums; + }, t; +}(L), fo = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(MediaQuery2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.MediaQuery; + return m.MediaQuery; }, - enumerable: false, - configurable: true - }); - return MediaQuery2; -}(Node); -var MediaCondition = function(_super) { - __extends(MediaCondition2, _super); - function MediaCondition2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), Yc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(MediaCondition2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.MediaCondition; + return m.MediaCondition; }, - enumerable: false, - configurable: true - }); - return MediaCondition2; -}(Node); -var MediaFeature = function(_super) { - __extends(MediaFeature2, _super); - function MediaFeature2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), Kc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(MediaFeature2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.MediaFeature; + return m.MediaFeature; }, - enumerable: false, - configurable: true - }); - return MediaFeature2; -}(Node); -var SupportsCondition = function(_super) { - __extends(SupportsCondition2, _super); - function SupportsCondition2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), Ut = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(SupportsCondition2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.SupportsCondition; + return m.SupportsCondition; }, - enumerable: false, - configurable: true - }); - return SupportsCondition2; -}(Node); -var Page = function(_super) { - __extends(Page2, _super); - function Page2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), Zc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Page2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Page; + return m.Page; }, - enumerable: false, - configurable: true - }); - return Page2; -}(BodyDeclaration); -var PageBoxMarginBox = function(_super) { - __extends(PageBoxMarginBox2, _super); - function PageBoxMarginBox2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), Qc = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(PageBoxMarginBox2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.PageBoxMarginBox; + return m.PageBoxMarginBox; }, - enumerable: false, - configurable: true - }); - return PageBoxMarginBox2; -}(BodyDeclaration); -var Expression = function(_super) { - __extends(Expression2, _super); - function Expression2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(ne), mo = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Expression2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Expression; + return m.Expression; }, - enumerable: false, - configurable: true - }); - return Expression2; -}(Node); -var BinaryExpression = function(_super) { - __extends(BinaryExpression2, _super); - function BinaryExpression2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), ai = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(BinaryExpression2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.BinaryExpression; + return m.BinaryExpression; }, - enumerable: false, - configurable: true - }); - BinaryExpression2.prototype.setLeft = function(left) { - return this.setNode("left", left); - }; - BinaryExpression2.prototype.getLeft = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setLeft = function(n) { + return this.setNode("left", n); + }, t.prototype.getLeft = function() { return this.left; - }; - BinaryExpression2.prototype.setRight = function(right) { - return this.setNode("right", right); - }; - BinaryExpression2.prototype.getRight = function() { + }, t.prototype.setRight = function(n) { + return this.setNode("right", n); + }, t.prototype.getRight = function() { return this.right; - }; - BinaryExpression2.prototype.setOperator = function(value) { - return this.setNode("operator", value); - }; - BinaryExpression2.prototype.getOperator = function() { + }, t.prototype.setOperator = function(n) { + return this.setNode("operator", n); + }, t.prototype.getOperator = function() { return this.operator; - }; - return BinaryExpression2; -}(Node); -var Term = function(_super) { - __extends(Term2, _super); - function Term2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), eh = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Term2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Term; + return m.Term; }, - enumerable: false, - configurable: true - }); - Term2.prototype.setOperator = function(value) { - return this.setNode("operator", value); - }; - Term2.prototype.getOperator = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setOperator = function(n) { + return this.setNode("operator", n); + }, t.prototype.getOperator = function() { return this.operator; - }; - Term2.prototype.setExpression = function(value) { - return this.setNode("expression", value); - }; - Term2.prototype.getExpression = function() { + }, t.prototype.setExpression = function(n) { + return this.setNode("expression", n); + }, t.prototype.getExpression = function() { return this.expression; - }; - return Term2; -}(Node); -var AttributeSelector = function(_super) { - __extends(AttributeSelector2, _super); - function AttributeSelector2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), th = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(AttributeSelector2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.AttributeSelector; + return m.AttributeSelector; }, - enumerable: false, - configurable: true - }); - AttributeSelector2.prototype.setNamespacePrefix = function(value) { - return this.setNode("namespacePrefix", value); - }; - AttributeSelector2.prototype.getNamespacePrefix = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setNamespacePrefix = function(n) { + return this.setNode("namespacePrefix", n); + }, t.prototype.getNamespacePrefix = function() { return this.namespacePrefix; - }; - AttributeSelector2.prototype.setIdentifier = function(value) { - return this.setNode("identifier", value); - }; - AttributeSelector2.prototype.getIdentifier = function() { + }, t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - AttributeSelector2.prototype.setOperator = function(operator) { - return this.setNode("operator", operator); - }; - AttributeSelector2.prototype.getOperator = function() { + }, t.prototype.setOperator = function(n) { + return this.setNode("operator", n); + }, t.prototype.getOperator = function() { return this.operator; - }; - AttributeSelector2.prototype.setValue = function(value) { - return this.setNode("value", value); - }; - AttributeSelector2.prototype.getValue = function() { + }, t.prototype.setValue = function(n) { + return this.setNode("value", n); + }, t.prototype.getValue = function() { return this.value; - }; - return AttributeSelector2; -}(Node); -(function(_super) { - __extends(Operator2, _super); - function Operator2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L); +(function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Operator2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Operator; + return m.Operator; }, - enumerable: false, - configurable: true - }); - return Operator2; -})(Node); -var HexColorValue = function(_super) { - __extends(HexColorValue2, _super); - function HexColorValue2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +})(L); +var si = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(HexColorValue2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.HexColorValue; + return m.HexColorValue; }, - enumerable: false, - configurable: true - }); - return HexColorValue2; -}(Node); -var RatioValue = function(_super) { - __extends(RatioValue2, _super); - function RatioValue2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), nh = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(RatioValue2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.RatioValue; + return m.RatioValue; }, - enumerable: false, - configurable: true - }); - return RatioValue2; -}(Node); -var _dot = ".".charCodeAt(0); -var _02 = "0".charCodeAt(0); -var _92 = "9".charCodeAt(0); -var NumericValue = function(_super) { - __extends(NumericValue2, _super); - function NumericValue2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), rh = ".".charCodeAt(0), ih = "0".charCodeAt(0), ah = "9".charCodeAt(0), oi = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(NumericValue2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.NumericValue; + return m.NumericValue; }, - enumerable: false, - configurable: true - }); - NumericValue2.prototype.getValue = function() { - var raw = this.getText(); - var unitIdx = 0; - var code; - for (var i = 0, len = raw.length; i < len; i++) { - code = raw.charCodeAt(i); - if (!(_02 <= code && code <= _92 || code === _dot)) { - break; - } - unitIdx += 1; - } + enumerable: !1, + configurable: !0 + }), t.prototype.getValue = function() { + for (var n = this.getText(), r = 0, i, a = 0, o = n.length; a < o && (i = n.charCodeAt(a), ih <= i && i <= ah || i === rh); a++) + r += 1; return { - value: raw.substring(0, unitIdx), - unit: unitIdx < raw.length ? raw.substring(unitIdx) : void 0 + value: n.substring(0, r), + unit: r < n.length ? n.substring(r) : void 0 }; - }; - return NumericValue2; -}(Node); -var VariableDeclaration = function(_super) { - __extends(VariableDeclaration2, _super); - function VariableDeclaration2(offset, length) { - var _this = _super.call(this, offset, length) || this; - _this.variable = null; - _this.value = null; - _this.needsSemicolon = true; - return _this; + }, t; +}(L), Vn = function(e) { + I(t, e); + function t(n, r) { + var i = e.call(this, n, r) || this; + return i.variable = null, i.value = null, i.needsSemicolon = !0, i; } - Object.defineProperty(VariableDeclaration2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.VariableDeclaration; + return m.VariableDeclaration; }, - enumerable: false, - configurable: true - }); - VariableDeclaration2.prototype.setVariable = function(node) { - if (node) { - node.attachTo(this); - this.variable = node; - return true; - } - return false; - }; - VariableDeclaration2.prototype.getVariable = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setVariable = function(n) { + return n ? (n.attachTo(this), this.variable = n, !0) : !1; + }, t.prototype.getVariable = function() { return this.variable; - }; - VariableDeclaration2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.variable ? this.variable.getName() : ""; - }; - VariableDeclaration2.prototype.setValue = function(node) { - if (node) { - node.attachTo(this); - this.value = node; - return true; - } - return false; - }; - VariableDeclaration2.prototype.getValue = function() { + }, t.prototype.setValue = function(n) { + return n ? (n.attachTo(this), this.value = n, !0) : !1; + }, t.prototype.getValue = function() { return this.value; - }; - return VariableDeclaration2; -}(AbstractDeclaration); -var Interpolation = function(_super) { - __extends(Interpolation2, _super); - function Interpolation2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(ni), zr = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Interpolation2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Interpolation; + return m.Interpolation; }, - enumerable: false, - configurable: true - }); - return Interpolation2; -}(Node); -var Variable = function(_super) { - __extends(Variable2, _super); - function Variable2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t; +}(L), li = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(Variable2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.VariableName; + return m.VariableName; }, - enumerable: false, - configurable: true - }); - Variable2.prototype.getName = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.getName = function() { return this.getText(); - }; - return Variable2; -}(Node); -var ExtendsReference = function(_super) { - __extends(ExtendsReference2, _super); - function ExtendsReference2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), qt = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(ExtendsReference2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.ExtendsReference; + return m.ExtendsReference; }, - enumerable: false, - configurable: true - }); - ExtendsReference2.prototype.getSelectors = function() { - if (!this.selectors) { - this.selectors = new Nodelist(this); - } - return this.selectors; - }; - return ExtendsReference2; -}(Node); -var MixinContentReference = function(_super) { - __extends(MixinContentReference2, _super); - function MixinContentReference2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.getSelectors = function() { + return this.selectors || (this.selectors = new me(this)), this.selectors; + }, t; +}(L), sh = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(MixinContentReference2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.MixinContentReference; + return m.MixinContentReference; }, - enumerable: false, - configurable: true - }); - MixinContentReference2.prototype.getArguments = function() { - if (!this.arguments) { - this.arguments = new Nodelist(this); - } - return this.arguments; - }; - return MixinContentReference2; -}(Node); -var MixinContentDeclaration = function(_super) { - __extends(MixinContentDeclaration2, _super); - function MixinContentDeclaration2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.getArguments = function() { + return this.arguments || (this.arguments = new me(this)), this.arguments; + }, t; +}(L), oh = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(MixinContentDeclaration2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.MixinContentReference; + return m.MixinContentReference; }, - enumerable: false, - configurable: true - }); - MixinContentDeclaration2.prototype.getParameters = function() { - if (!this.parameters) { - this.parameters = new Nodelist(this); - } - return this.parameters; - }; - return MixinContentDeclaration2; -}(BodyDeclaration); -var MixinReference = function(_super) { - __extends(MixinReference2, _super); - function MixinReference2(offset, length) { - return _super.call(this, offset, length) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.getParameters = function() { + return this.parameters || (this.parameters = new me(this)), this.parameters; + }, t; +}(ne), Fn = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(MixinReference2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.MixinReference; + return m.MixinReference; }, - enumerable: false, - configurable: true - }); - MixinReference2.prototype.getNamespaces = function() { - if (!this.namespaces) { - this.namespaces = new Nodelist(this); - } - return this.namespaces; - }; - MixinReference2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - MixinReference2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.getNamespaces = function() { + return this.namespaces || (this.namespaces = new me(this)), this.namespaces; + }, t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - MixinReference2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - MixinReference2.prototype.getArguments = function() { - if (!this.arguments) { - this.arguments = new Nodelist(this); - } - return this.arguments; - }; - MixinReference2.prototype.setContent = function(node) { - return this.setNode("content", node); - }; - MixinReference2.prototype.getContent = function() { + }, t.prototype.getArguments = function() { + return this.arguments || (this.arguments = new me(this)), this.arguments; + }, t.prototype.setContent = function(n) { + return this.setNode("content", n); + }, t.prototype.getContent = function() { return this.content; - }; - return MixinReference2; -}(Node); -var MixinDeclaration = function(_super) { - __extends(MixinDeclaration2, _super); - function MixinDeclaration2(offset, length) { - return _super.call(this, offset, length) || this; + }, t; +}(L), $t = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(MixinDeclaration2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.MixinDeclaration; + return m.MixinDeclaration; }, - enumerable: false, - configurable: true - }); - MixinDeclaration2.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - MixinDeclaration2.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - MixinDeclaration2.prototype.getName = function() { + }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; - }; - MixinDeclaration2.prototype.getParameters = function() { - if (!this.parameters) { - this.parameters = new Nodelist(this); - } - return this.parameters; - }; - MixinDeclaration2.prototype.setGuard = function(node) { - if (node) { - node.attachTo(this); - this.guard = node; - } - return false; - }; - return MixinDeclaration2; -}(BodyDeclaration); -var UnknownAtRule = function(_super) { - __extends(UnknownAtRule2, _super); - function UnknownAtRule2(offset, length) { - return _super.call(this, offset, length) || this; + }, t.prototype.getParameters = function() { + return this.parameters || (this.parameters = new me(this)), this.parameters; + }, t.prototype.setGuard = function(n) { + return n && (n.attachTo(this), this.guard = n), !1; + }, t; +}(ne), go = function(e) { + I(t, e); + function t(n, r) { + return e.call(this, n, r) || this; } - Object.defineProperty(UnknownAtRule2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.UnknownAtRule; + return m.UnknownAtRule; }, - enumerable: false, - configurable: true - }); - UnknownAtRule2.prototype.setAtRuleName = function(atRuleName) { - this.atRuleName = atRuleName; - }; - UnknownAtRule2.prototype.getAtRuleName = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setAtRuleName = function(n) { + this.atRuleName = n; + }, t.prototype.getAtRuleName = function() { return this.atRuleName; - }; - return UnknownAtRule2; -}(BodyDeclaration); -var ListEntry = function(_super) { - __extends(ListEntry2, _super); - function ListEntry2() { - return _super !== null && _super.apply(this, arguments) || this; + }, t; +}(ne), lh = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - Object.defineProperty(ListEntry2.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.ListEntry; + return m.ListEntry; }, - enumerable: false, - configurable: true - }); - ListEntry2.prototype.setKey = function(node) { - return this.setNode("key", node, 0); - }; - ListEntry2.prototype.setValue = function(node) { - return this.setNode("value", node, 1); - }; - return ListEntry2; -}(Node); -var LessGuard = function(_super) { - __extends(LessGuard2, _super); - function LessGuard2() { - return _super !== null && _super.apply(this, arguments) || this; + enumerable: !1, + configurable: !0 + }), t.prototype.setKey = function(n) { + return this.setNode("key", n, 0); + }, t.prototype.setValue = function(n) { + return this.setNode("value", n, 1); + }, t; +}(L), ch = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - LessGuard2.prototype.getConditions = function() { - if (!this.conditions) { - this.conditions = new Nodelist(this); - } - return this.conditions; - }; - return LessGuard2; -}(Node); -var GuardCondition = function(_super) { - __extends(GuardCondition2, _super); - function GuardCondition2() { - return _super !== null && _super.apply(this, arguments) || this; + return t.prototype.getConditions = function() { + return this.conditions || (this.conditions = new me(this)), this.conditions; + }, t; +}(L), hh = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - GuardCondition2.prototype.setVariable = function(node) { - return this.setNode("variable", node); - }; - return GuardCondition2; -}(Node); -var Module = function(_super) { - __extends(Module3, _super); - function Module3() { - return _super !== null && _super.apply(this, arguments) || this; + return t.prototype.setVariable = function(n) { + return this.setNode("variable", n); + }, t; +}(L), La = function(e) { + I(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - Object.defineProperty(Module3.prototype, "type", { + return Object.defineProperty(t.prototype, "type", { get: function() { - return NodeType.Module; + return m.Module; }, - enumerable: false, - configurable: true - }); - Module3.prototype.setIdentifier = function(node) { - return this.setNode("identifier", node, 0); - }; - Module3.prototype.getIdentifier = function() { + enumerable: !1, + configurable: !0 + }), t.prototype.setIdentifier = function(n) { + return this.setNode("identifier", n, 0); + }, t.prototype.getIdentifier = function() { return this.identifier; - }; - return Module3; -}(Node); -var Level; -(function(Level2) { - Level2[Level2["Ignore"] = 1] = "Ignore"; - Level2[Level2["Warning"] = 2] = "Warning"; - Level2[Level2["Error"] = 4] = "Error"; -})(Level || (Level = {})); -var Marker = function() { - function Marker2(node, rule, level, message, offset, length) { - if (offset === void 0) { - offset = node.offset; - } - if (length === void 0) { - length = node.length; - } - this.node = node; - this.rule = rule; - this.level = level; - this.message = message || rule.message; - this.offset = offset; - this.length = length; + }, t; +}(L), _e; +(function(e) { + e[e.Ignore = 1] = "Ignore", e[e.Warning = 2] = "Warning", e[e.Error = 4] = "Error"; +})(_e || (_e = {})); +var bo = function() { + function e(t, n, r, i, a, o) { + a === void 0 && (a = t.offset), o === void 0 && (o = t.length), this.node = t, this.rule = n, this.level = r, this.message = i || n.message, this.offset = a, this.length = o; } - Marker2.prototype.getRule = function() { + return e.prototype.getRule = function() { return this.rule; - }; - Marker2.prototype.getLevel = function() { + }, e.prototype.getLevel = function() { return this.level; - }; - Marker2.prototype.getOffset = function() { + }, e.prototype.getOffset = function() { return this.offset; - }; - Marker2.prototype.getLength = function() { + }, e.prototype.getLength = function() { return this.length; - }; - Marker2.prototype.getNode = function() { + }, e.prototype.getNode = function() { return this.node; - }; - Marker2.prototype.getMessage = function() { + }, e.prototype.getMessage = function() { return this.message; - }; - return Marker2; -}(); -var ParseErrorCollector = function() { - function ParseErrorCollector2() { + }, e; +}(), dh = function() { + function e() { this.entries = []; } - ParseErrorCollector2.entries = function(node) { - var visitor = new ParseErrorCollector2(); - node.acceptVisitor(visitor); - return visitor.entries; - }; - ParseErrorCollector2.prototype.visitNode = function(node) { - if (node.isErroneous()) { - node.collectIssues(this.entries); - } - return true; - }; - return ParseErrorCollector2; + return e.entries = function(t) { + var n = new e(); + return t.acceptVisitor(n), n.entries; + }, e.prototype.visitNode = function(t) { + return t.isErroneous() && t.collectIssues(this.entries), !0; + }, e; }(); -function format(message, args) { - let result; - if (args.length === 0) { - result = message; - } else { - result = message.replace(/\{(\d+)\}/g, (match, rest) => { - let index = rest[0]; - return typeof args[index] !== "undefined" ? args[index] : match; - }); - } - return result; +function uh(e, t) { + let n; + return t.length === 0 ? n = e : n = e.replace(/\{(\d+)\}/g, (r, i) => { + let a = i[0]; + return typeof t[a] < "u" ? t[a] : r; + }), n; } -function localize(key, message, ...args) { - return format(message, args); +function ph(e, t, ...n) { + return uh(t, n); } -function loadMessageBundle(file) { - return localize; +function Le(e) { + return ph; } -var localize2 = loadMessageBundle(); -var CSSIssueType = function() { - function CSSIssueType2(id, message) { - this.id = id; - this.message = message; +var J = Le(), X = function() { + function e(t, n) { + this.id = t, this.message = n; } - return CSSIssueType2; -}(); -var ParseError = { - NumberExpected: new CSSIssueType("css-numberexpected", localize2("expected.number", "number expected")), - ConditionExpected: new CSSIssueType("css-conditionexpected", localize2("expected.condt", "condition expected")), - RuleOrSelectorExpected: new CSSIssueType("css-ruleorselectorexpected", localize2("expected.ruleorselector", "at-rule or selector expected")), - DotExpected: new CSSIssueType("css-dotexpected", localize2("expected.dot", "dot expected")), - ColonExpected: new CSSIssueType("css-colonexpected", localize2("expected.colon", "colon expected")), - SemiColonExpected: new CSSIssueType("css-semicolonexpected", localize2("expected.semicolon", "semi-colon expected")), - TermExpected: new CSSIssueType("css-termexpected", localize2("expected.term", "term expected")), - ExpressionExpected: new CSSIssueType("css-expressionexpected", localize2("expected.expression", "expression expected")), - OperatorExpected: new CSSIssueType("css-operatorexpected", localize2("expected.operator", "operator expected")), - IdentifierExpected: new CSSIssueType("css-identifierexpected", localize2("expected.ident", "identifier expected")), - PercentageExpected: new CSSIssueType("css-percentageexpected", localize2("expected.percentage", "percentage expected")), - URIOrStringExpected: new CSSIssueType("css-uriorstringexpected", localize2("expected.uriorstring", "uri or string expected")), - URIExpected: new CSSIssueType("css-uriexpected", localize2("expected.uri", "URI expected")), - VariableNameExpected: new CSSIssueType("css-varnameexpected", localize2("expected.varname", "variable name expected")), - VariableValueExpected: new CSSIssueType("css-varvalueexpected", localize2("expected.varvalue", "variable value expected")), - PropertyValueExpected: new CSSIssueType("css-propertyvalueexpected", localize2("expected.propvalue", "property value expected")), - LeftCurlyExpected: new CSSIssueType("css-lcurlyexpected", localize2("expected.lcurly", "{ expected")), - RightCurlyExpected: new CSSIssueType("css-rcurlyexpected", localize2("expected.rcurly", "} expected")), - LeftSquareBracketExpected: new CSSIssueType("css-rbracketexpected", localize2("expected.lsquare", "[ expected")), - RightSquareBracketExpected: new CSSIssueType("css-lbracketexpected", localize2("expected.rsquare", "] expected")), - LeftParenthesisExpected: new CSSIssueType("css-lparentexpected", localize2("expected.lparen", "( expected")), - RightParenthesisExpected: new CSSIssueType("css-rparentexpected", localize2("expected.rparent", ") expected")), - CommaExpected: new CSSIssueType("css-commaexpected", localize2("expected.comma", "comma expected")), - PageDirectiveOrDeclarationExpected: new CSSIssueType("css-pagedirordeclexpected", localize2("expected.pagedirordecl", "page directive or declaraton expected")), - UnknownAtRule: new CSSIssueType("css-unknownatrule", localize2("unknown.atrule", "at-rule unknown")), - UnknownKeyword: new CSSIssueType("css-unknownkeyword", localize2("unknown.keyword", "unknown keyword")), - SelectorExpected: new CSSIssueType("css-selectorexpected", localize2("expected.selector", "selector expected")), - StringLiteralExpected: new CSSIssueType("css-stringliteralexpected", localize2("expected.stringliteral", "string literal expected")), - WhitespaceExpected: new CSSIssueType("css-whitespaceexpected", localize2("expected.whitespace", "whitespace expected")), - MediaQueryExpected: new CSSIssueType("css-mediaqueryexpected", localize2("expected.mediaquery", "media query expected")), - IdentifierOrWildcardExpected: new CSSIssueType("css-idorwildcardexpected", localize2("expected.idorwildcard", "identifier or wildcard expected")), - WildcardExpected: new CSSIssueType("css-wildcardexpected", localize2("expected.wildcard", "wildcard expected")), - IdentifierOrVariableExpected: new CSSIssueType("css-idorvarexpected", localize2("expected.idorvar", "identifier or variable expected")) -}; -var integer; -(function(integer2) { - integer2.MIN_VALUE = -2147483648; - integer2.MAX_VALUE = 2147483647; -})(integer || (integer = {})); -var uinteger; -(function(uinteger2) { - uinteger2.MIN_VALUE = 0; - uinteger2.MAX_VALUE = 2147483647; -})(uinteger || (uinteger = {})); -var Position; -(function(Position2) { - function create(line, character) { - if (line === Number.MAX_VALUE) { - line = uinteger.MAX_VALUE; - } - if (character === Number.MAX_VALUE) { - character = uinteger.MAX_VALUE; - } - return { line, character }; + return e; +}(), v = { + NumberExpected: new X("css-numberexpected", J("expected.number", "number expected")), + ConditionExpected: new X("css-conditionexpected", J("expected.condt", "condition expected")), + RuleOrSelectorExpected: new X("css-ruleorselectorexpected", J("expected.ruleorselector", "at-rule or selector expected")), + DotExpected: new X("css-dotexpected", J("expected.dot", "dot expected")), + ColonExpected: new X("css-colonexpected", J("expected.colon", "colon expected")), + SemiColonExpected: new X("css-semicolonexpected", J("expected.semicolon", "semi-colon expected")), + TermExpected: new X("css-termexpected", J("expected.term", "term expected")), + ExpressionExpected: new X("css-expressionexpected", J("expected.expression", "expression expected")), + OperatorExpected: new X("css-operatorexpected", J("expected.operator", "operator expected")), + IdentifierExpected: new X("css-identifierexpected", J("expected.ident", "identifier expected")), + PercentageExpected: new X("css-percentageexpected", J("expected.percentage", "percentage expected")), + URIOrStringExpected: new X("css-uriorstringexpected", J("expected.uriorstring", "uri or string expected")), + URIExpected: new X("css-uriexpected", J("expected.uri", "URI expected")), + VariableNameExpected: new X("css-varnameexpected", J("expected.varname", "variable name expected")), + VariableValueExpected: new X("css-varvalueexpected", J("expected.varvalue", "variable value expected")), + PropertyValueExpected: new X("css-propertyvalueexpected", J("expected.propvalue", "property value expected")), + LeftCurlyExpected: new X("css-lcurlyexpected", J("expected.lcurly", "{ expected")), + RightCurlyExpected: new X("css-rcurlyexpected", J("expected.rcurly", "} expected")), + LeftSquareBracketExpected: new X("css-rbracketexpected", J("expected.lsquare", "[ expected")), + RightSquareBracketExpected: new X("css-lbracketexpected", J("expected.rsquare", "] expected")), + LeftParenthesisExpected: new X("css-lparentexpected", J("expected.lparen", "( expected")), + RightParenthesisExpected: new X("css-rparentexpected", J("expected.rparent", ") expected")), + CommaExpected: new X("css-commaexpected", J("expected.comma", "comma expected")), + PageDirectiveOrDeclarationExpected: new X("css-pagedirordeclexpected", J("expected.pagedirordecl", "page directive or declaraton expected")), + UnknownAtRule: new X("css-unknownatrule", J("unknown.atrule", "at-rule unknown")), + UnknownKeyword: new X("css-unknownkeyword", J("unknown.keyword", "unknown keyword")), + SelectorExpected: new X("css-selectorexpected", J("expected.selector", "selector expected")), + StringLiteralExpected: new X("css-stringliteralexpected", J("expected.stringliteral", "string literal expected")), + WhitespaceExpected: new X("css-whitespaceexpected", J("expected.whitespace", "whitespace expected")), + MediaQueryExpected: new X("css-mediaqueryexpected", J("expected.mediaquery", "media query expected")), + IdentifierOrWildcardExpected: new X("css-idorwildcardexpected", J("expected.idorwildcard", "identifier or wildcard expected")), + WildcardExpected: new X("css-wildcardexpected", J("expected.wildcard", "wildcard expected")), + IdentifierOrVariableExpected: new X("css-idorvarexpected", J("expected.idorvar", "identifier or variable expected")) +}, Ta; +(function(e) { + e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647; +})(Ta || (Ta = {})); +var _n; +(function(e) { + e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647; +})(_n || (_n = {})); +var Fe; +(function(e) { + function t(r, i) { + return r === Number.MAX_VALUE && (r = _n.MAX_VALUE), i === Number.MAX_VALUE && (i = _n.MAX_VALUE), { line: r, character: i }; } - Position2.create = create; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + e.create = t; + function n(r) { + var i = r; + return x.objectLiteral(i) && x.uinteger(i.line) && x.uinteger(i.character); } - Position2.is = is; -})(Position || (Position = {})); -var Range; -(function(Range2) { - function create(one, two, three, four) { - if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { - return { start: Position.create(one, two), end: Position.create(three, four) }; - } else if (Position.is(one) && Position.is(two)) { - return { start: one, end: two }; - } else { - throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]"); - } + e.is = n; +})(Fe || (Fe = {})); +var Q; +(function(e) { + function t(r, i, a, o) { + if (x.uinteger(r) && x.uinteger(i) && x.uinteger(a) && x.uinteger(o)) + return { start: Fe.create(r, i), end: Fe.create(a, o) }; + if (Fe.is(r) && Fe.is(i)) + return { start: r, end: i }; + throw new Error("Range#create called with invalid arguments[" + r + ", " + i + ", " + a + ", " + o + "]"); } - Range2.create = create; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + e.create = t; + function n(r) { + var i = r; + return x.objectLiteral(i) && Fe.is(i.start) && Fe.is(i.end); } - Range2.is = is; -})(Range || (Range = {})); -var Location; -(function(Location2) { - function create(uri, range) { - return { uri, range }; + e.is = n; +})(Q || (Q = {})); +var Ht; +(function(e) { + function t(r, i) { + return { uri: r, range: i }; } - Location2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && Q.is(i.range) && (x.string(i.uri) || x.undefined(i.uri)); } - Location2.is = is; -})(Location || (Location = {})); -var LocationLink; -(function(LocationLink2) { - function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { - return { targetUri, targetRange, targetSelectionRange, originSelectionRange }; + e.is = n; +})(Ht || (Ht = {})); +var Wa; +(function(e) { + function t(r, i, a, o) { + return { targetUri: r, targetRange: i, targetSelectionRange: a, originSelectionRange: o }; } - LocationLink2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange)) && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && Q.is(i.targetRange) && x.string(i.targetUri) && (Q.is(i.targetSelectionRange) || x.undefined(i.targetSelectionRange)) && (Q.is(i.originSelectionRange) || x.undefined(i.originSelectionRange)); } - LocationLink2.is = is; -})(LocationLink || (LocationLink = {})); -var Color; -(function(Color2) { - function create(red, green, blue, alpha) { + e.is = n; +})(Wa || (Wa = {})); +var Mr; +(function(e) { + function t(r, i, a, o) { return { - red, - green, - blue, - alpha + red: r, + green: i, + blue: a, + alpha: o }; } - Color2.create = create; - function is(value) { - var candidate = value; - return Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1); + e.create = t; + function n(r) { + var i = r; + return x.numberRange(i.red, 0, 1) && x.numberRange(i.green, 0, 1) && x.numberRange(i.blue, 0, 1) && x.numberRange(i.alpha, 0, 1); } - Color2.is = is; -})(Color || (Color = {})); -var ColorInformation; -(function(ColorInformation2) { - function create(range, color) { + e.is = n; +})(Mr || (Mr = {})); +var Oa; +(function(e) { + function t(r, i) { return { - range, - color + range: r, + color: i }; } - ColorInformation2.create = create; - function is(value) { - var candidate = value; - return Range.is(candidate.range) && Color.is(candidate.color); + e.create = t; + function n(r) { + var i = r; + return Q.is(i.range) && Mr.is(i.color); } - ColorInformation2.is = is; -})(ColorInformation || (ColorInformation = {})); -var ColorPresentation; -(function(ColorPresentation2) { - function create(label, textEdit, additionalTextEdits) { + e.is = n; +})(Oa || (Oa = {})); +var Va; +(function(e) { + function t(r, i, a) { return { - label, - textEdit, - additionalTextEdits + label: r, + textEdit: i, + additionalTextEdits: a }; } - ColorPresentation2.create = create; - function is(value) { - var candidate = value; - return Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + e.create = t; + function n(r) { + var i = r; + return x.string(i.label) && (x.undefined(i.textEdit) || B.is(i)) && (x.undefined(i.additionalTextEdits) || x.typedArray(i.additionalTextEdits, B.is)); } - ColorPresentation2.is = is; -})(ColorPresentation || (ColorPresentation = {})); -var FoldingRangeKind; -(function(FoldingRangeKind2) { - FoldingRangeKind2["Comment"] = "comment"; - FoldingRangeKind2["Imports"] = "imports"; - FoldingRangeKind2["Region"] = "region"; -})(FoldingRangeKind || (FoldingRangeKind = {})); -var FoldingRange; -(function(FoldingRange2) { - function create(startLine, endLine, startCharacter, endCharacter, kind) { - var result = { - startLine, - endLine + e.is = n; +})(Va || (Va = {})); +var Ua; +(function(e) { + e.Comment = "comment", e.Imports = "imports", e.Region = "region"; +})(Ua || (Ua = {})); +var Ba; +(function(e) { + function t(r, i, a, o, l) { + var h = { + startLine: r, + endLine: i }; - if (Is.defined(startCharacter)) { - result.startCharacter = startCharacter; - } - if (Is.defined(endCharacter)) { - result.endCharacter = endCharacter; - } - if (Is.defined(kind)) { - result.kind = kind; - } - return result; + return x.defined(a) && (h.startCharacter = a), x.defined(o) && (h.endCharacter = o), x.defined(l) && (h.kind = l), h; } - FoldingRange2.create = create; - function is(value) { - var candidate = value; - return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + e.create = t; + function n(r) { + var i = r; + return x.uinteger(i.startLine) && x.uinteger(i.startLine) && (x.undefined(i.startCharacter) || x.uinteger(i.startCharacter)) && (x.undefined(i.endCharacter) || x.uinteger(i.endCharacter)) && (x.undefined(i.kind) || x.string(i.kind)); } - FoldingRange2.is = is; -})(FoldingRange || (FoldingRange = {})); -var DiagnosticRelatedInformation; -(function(DiagnosticRelatedInformation2) { - function create(location, message) { + e.is = n; +})(Ba || (Ba = {})); +var Nr; +(function(e) { + function t(r, i) { return { - location, - message + location: r, + message: i }; } - DiagnosticRelatedInformation2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && Ht.is(i.location) && x.string(i.message); } - DiagnosticRelatedInformation2.is = is; -})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {})); -var DiagnosticSeverity; -(function(DiagnosticSeverity2) { - DiagnosticSeverity2.Error = 1; - DiagnosticSeverity2.Warning = 2; - DiagnosticSeverity2.Information = 3; - DiagnosticSeverity2.Hint = 4; -})(DiagnosticSeverity || (DiagnosticSeverity = {})); -var DiagnosticTag; -(function(DiagnosticTag2) { - DiagnosticTag2.Unnecessary = 1; - DiagnosticTag2.Deprecated = 2; -})(DiagnosticTag || (DiagnosticTag = {})); -var CodeDescription; -(function(CodeDescription2) { - function is(value) { - var candidate = value; - return candidate !== void 0 && candidate !== null && Is.string(candidate.href); + e.is = n; +})(Nr || (Nr = {})); +var Dn; +(function(e) { + e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4; +})(Dn || (Dn = {})); +var ja; +(function(e) { + e.Unnecessary = 1, e.Deprecated = 2; +})(ja || (ja = {})); +var qa; +(function(e) { + function t(n) { + var r = n; + return r != null && x.string(r.href); } - CodeDescription2.is = is; -})(CodeDescription || (CodeDescription = {})); -var Diagnostic; -(function(Diagnostic2) { - function create(range, message, severity, code, source, relatedInformation) { - var result = { range, message }; - if (Is.defined(severity)) { - result.severity = severity; - } - if (Is.defined(code)) { - result.code = code; - } - if (Is.defined(source)) { - result.source = source; - } - if (Is.defined(relatedInformation)) { - result.relatedInformation = relatedInformation; - } - return result; + e.is = t; +})(qa || (qa = {})); +var En; +(function(e) { + function t(r, i, a, o, l, h) { + var c = { range: r, message: i }; + return x.defined(a) && (c.severity = a), x.defined(o) && (c.code = o), x.defined(l) && (c.source = l), x.defined(h) && (c.relatedInformation = h), c; } - Diagnostic2.create = create; - function is(value) { - var _a2; - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a2 = candidate.codeDescription) === null || _a2 === void 0 ? void 0 : _a2.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + e.create = t; + function n(r) { + var i, a = r; + return x.defined(a) && Q.is(a.range) && x.string(a.message) && (x.number(a.severity) || x.undefined(a.severity)) && (x.integer(a.code) || x.string(a.code) || x.undefined(a.code)) && (x.undefined(a.codeDescription) || x.string((i = a.codeDescription) === null || i === void 0 ? void 0 : i.href)) && (x.string(a.source) || x.undefined(a.source)) && (x.undefined(a.relatedInformation) || x.typedArray(a.relatedInformation, Nr.is)); } - Diagnostic2.is = is; -})(Diagnostic || (Diagnostic = {})); -var Command; -(function(Command2) { - function create(title, command) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var result = { title, command }; - if (Is.defined(args) && args.length > 0) { - result.arguments = args; - } - return result; + e.is = n; +})(En || (En = {})); +var Et; +(function(e) { + function t(r, i) { + for (var a = [], o = 2; o < arguments.length; o++) + a[o - 2] = arguments[o]; + var l = { title: r, command: i }; + return x.defined(a) && a.length > 0 && (l.arguments = a), l; } - Command2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && x.string(i.title) && x.string(i.command); } - Command2.is = is; -})(Command || (Command = {})); -var TextEdit; -(function(TextEdit2) { - function replace(range, newText) { - return { range, newText }; + e.is = n; +})(Et || (Et = {})); +var B; +(function(e) { + function t(a, o) { + return { range: a, newText: o }; } - TextEdit2.replace = replace; - function insert(position, newText) { - return { range: { start: position, end: position }, newText }; + e.replace = t; + function n(a, o) { + return { range: { start: a, end: a }, newText: o }; } - TextEdit2.insert = insert; - function del(range) { - return { range, newText: "" }; + e.insert = n; + function r(a) { + return { range: a, newText: "" }; } - TextEdit2.del = del; - function is(value) { - var candidate = value; - return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range.is(candidate.range); + e.del = r; + function i(a) { + var o = a; + return x.objectLiteral(o) && x.string(o.newText) && Q.is(o.range); } - TextEdit2.is = is; -})(TextEdit || (TextEdit = {})); -var ChangeAnnotation; -(function(ChangeAnnotation2) { - function create(label, needsConfirmation, description) { - var result = { label }; - if (needsConfirmation !== void 0) { - result.needsConfirmation = needsConfirmation; - } - if (description !== void 0) { - result.description = description; - } - return result; + e.is = i; +})(B || (B = {})); +var Ft; +(function(e) { + function t(r, i, a) { + var o = { label: r }; + return i !== void 0 && (o.needsConfirmation = i), a !== void 0 && (o.description = a), o; } - ChangeAnnotation2.create = create; - function is(value) { - var candidate = value; - return candidate !== void 0 && Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === void 0) && (Is.string(candidate.description) || candidate.description === void 0); + e.create = t; + function n(r) { + var i = r; + return i !== void 0 && x.objectLiteral(i) && x.string(i.label) && (x.boolean(i.needsConfirmation) || i.needsConfirmation === void 0) && (x.string(i.description) || i.description === void 0); } - ChangeAnnotation2.is = is; -})(ChangeAnnotation || (ChangeAnnotation = {})); -var ChangeAnnotationIdentifier; -(function(ChangeAnnotationIdentifier2) { - function is(value) { - var candidate = value; - return typeof candidate === "string"; + e.is = n; +})(Ft || (Ft = {})); +var be; +(function(e) { + function t(n) { + var r = n; + return typeof r == "string"; } - ChangeAnnotationIdentifier2.is = is; -})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {})); -var AnnotatedTextEdit; -(function(AnnotatedTextEdit2) { - function replace(range, newText, annotation) { - return { range, newText, annotationId: annotation }; + e.is = t; +})(be || (be = {})); +var Ze; +(function(e) { + function t(a, o, l) { + return { range: a, newText: o, annotationId: l }; } - AnnotatedTextEdit2.replace = replace; - function insert(position, newText, annotation) { - return { range: { start: position, end: position }, newText, annotationId: annotation }; + e.replace = t; + function n(a, o, l) { + return { range: { start: a, end: a }, newText: o, annotationId: l }; } - AnnotatedTextEdit2.insert = insert; - function del(range, annotation) { - return { range, newText: "", annotationId: annotation }; + e.insert = n; + function r(a, o) { + return { range: a, newText: "", annotationId: o }; } - AnnotatedTextEdit2.del = del; - function is(value) { - var candidate = value; - return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + e.del = r; + function i(a) { + var o = a; + return B.is(o) && (Ft.is(o.annotationId) || be.is(o.annotationId)); } - AnnotatedTextEdit2.is = is; -})(AnnotatedTextEdit || (AnnotatedTextEdit = {})); -var TextDocumentEdit; -(function(TextDocumentEdit2) { - function create(textDocument, edits) { - return { textDocument, edits }; + e.is = i; +})(Ze || (Ze = {})); +var Gt; +(function(e) { + function t(r, i) { + return { textDocument: r, edits: i }; } - TextDocumentEdit2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && Rn.is(i.textDocument) && Array.isArray(i.edits); } - TextDocumentEdit2.is = is; -})(TextDocumentEdit || (TextDocumentEdit = {})); -var CreateFile; -(function(CreateFile2) { - function create(uri, options, annotation) { - var result = { + e.is = n; +})(Gt || (Gt = {})); +var Jt; +(function(e) { + function t(r, i, a) { + var o = { kind: "create", - uri + uri: r }; - if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) { - result.options = options; - } - if (annotation !== void 0) { - result.annotationId = annotation; - } - return result; + return i !== void 0 && (i.overwrite !== void 0 || i.ignoreIfExists !== void 0) && (o.options = i), a !== void 0 && (o.annotationId = a), o; } - CreateFile2.create = create; - function is(value) { - var candidate = value; - return candidate && candidate.kind === "create" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + e.create = t; + function n(r) { + var i = r; + return i && i.kind === "create" && x.string(i.uri) && (i.options === void 0 || (i.options.overwrite === void 0 || x.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || x.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || be.is(i.annotationId)); } - CreateFile2.is = is; -})(CreateFile || (CreateFile = {})); -var RenameFile; -(function(RenameFile2) { - function create(oldUri, newUri, options, annotation) { - var result = { + e.is = n; +})(Jt || (Jt = {})); +var Xt; +(function(e) { + function t(r, i, a, o) { + var l = { kind: "rename", - oldUri, - newUri + oldUri: r, + newUri: i }; - if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) { - result.options = options; - } - if (annotation !== void 0) { - result.annotationId = annotation; - } - return result; + return a !== void 0 && (a.overwrite !== void 0 || a.ignoreIfExists !== void 0) && (l.options = a), o !== void 0 && (l.annotationId = o), l; } - RenameFile2.create = create; - function is(value) { - var candidate = value; - return candidate && candidate.kind === "rename" && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + e.create = t; + function n(r) { + var i = r; + return i && i.kind === "rename" && x.string(i.oldUri) && x.string(i.newUri) && (i.options === void 0 || (i.options.overwrite === void 0 || x.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || x.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || be.is(i.annotationId)); } - RenameFile2.is = is; -})(RenameFile || (RenameFile = {})); -var DeleteFile; -(function(DeleteFile2) { - function create(uri, options, annotation) { - var result = { + e.is = n; +})(Xt || (Xt = {})); +var Yt; +(function(e) { + function t(r, i, a) { + var o = { kind: "delete", - uri + uri: r }; - if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) { - result.options = options; - } - if (annotation !== void 0) { - result.annotationId = annotation; - } - return result; + return i !== void 0 && (i.recursive !== void 0 || i.ignoreIfNotExists !== void 0) && (o.options = i), a !== void 0 && (o.annotationId = a), o; } - DeleteFile2.create = create; - function is(value) { - var candidate = value; - return candidate && candidate.kind === "delete" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + e.create = t; + function n(r) { + var i = r; + return i && i.kind === "delete" && x.string(i.uri) && (i.options === void 0 || (i.options.recursive === void 0 || x.boolean(i.options.recursive)) && (i.options.ignoreIfNotExists === void 0 || x.boolean(i.options.ignoreIfNotExists))) && (i.annotationId === void 0 || be.is(i.annotationId)); } - DeleteFile2.is = is; -})(DeleteFile || (DeleteFile = {})); -var WorkspaceEdit; -(function(WorkspaceEdit2) { - function is(value) { - var candidate = value; - return candidate && (candidate.changes !== void 0 || candidate.documentChanges !== void 0) && (candidate.documentChanges === void 0 || candidate.documentChanges.every(function(change) { - if (Is.string(change.kind)) { - return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); - } else { - return TextDocumentEdit.is(change); - } + e.is = n; +})(Yt || (Yt = {})); +var Pr; +(function(e) { + function t(n) { + var r = n; + return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(i) { + return x.string(i.kind) ? Jt.is(i) || Xt.is(i) || Yt.is(i) : Gt.is(i); })); } - WorkspaceEdit2.is = is; -})(WorkspaceEdit || (WorkspaceEdit = {})); -var TextEditChangeImpl = function() { - function TextEditChangeImpl2(edits, changeAnnotations) { - this.edits = edits; - this.changeAnnotations = changeAnnotations; + e.is = t; +})(Pr || (Pr = {})); +var ln = function() { + function e(t, n) { + this.edits = t, this.changeAnnotations = n; } - TextEditChangeImpl2.prototype.insert = function(position, newText, annotation) { - var edit; - var id; - if (annotation === void 0) { - edit = TextEdit.insert(position, newText); - } else if (ChangeAnnotationIdentifier.is(annotation)) { - id = annotation; - edit = AnnotatedTextEdit.insert(position, newText, annotation); - } else { - this.assertChangeAnnotations(this.changeAnnotations); - id = this.changeAnnotations.manage(annotation); - edit = AnnotatedTextEdit.insert(position, newText, id); - } - this.edits.push(edit); - if (id !== void 0) { - return id; - } - }; - TextEditChangeImpl2.prototype.replace = function(range, newText, annotation) { - var edit; - var id; - if (annotation === void 0) { - edit = TextEdit.replace(range, newText); - } else if (ChangeAnnotationIdentifier.is(annotation)) { - id = annotation; - edit = AnnotatedTextEdit.replace(range, newText, annotation); - } else { - this.assertChangeAnnotations(this.changeAnnotations); - id = this.changeAnnotations.manage(annotation); - edit = AnnotatedTextEdit.replace(range, newText, id); - } - this.edits.push(edit); - if (id !== void 0) { - return id; - } - }; - TextEditChangeImpl2.prototype.delete = function(range, annotation) { - var edit; - var id; - if (annotation === void 0) { - edit = TextEdit.del(range); - } else if (ChangeAnnotationIdentifier.is(annotation)) { - id = annotation; - edit = AnnotatedTextEdit.del(range, annotation); - } else { - this.assertChangeAnnotations(this.changeAnnotations); - id = this.changeAnnotations.manage(annotation); - edit = AnnotatedTextEdit.del(range, id); - } - this.edits.push(edit); - if (id !== void 0) { - return id; - } - }; - TextEditChangeImpl2.prototype.add = function(edit) { - this.edits.push(edit); - }; - TextEditChangeImpl2.prototype.all = function() { + return e.prototype.insert = function(t, n, r) { + var i, a; + if (r === void 0 ? i = B.insert(t, n) : be.is(r) ? (a = r, i = Ze.insert(t, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), i = Ze.insert(t, n, a)), this.edits.push(i), a !== void 0) + return a; + }, e.prototype.replace = function(t, n, r) { + var i, a; + if (r === void 0 ? i = B.replace(t, n) : be.is(r) ? (a = r, i = Ze.replace(t, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), i = Ze.replace(t, n, a)), this.edits.push(i), a !== void 0) + return a; + }, e.prototype.delete = function(t, n) { + var r, i; + if (n === void 0 ? r = B.del(t) : be.is(n) ? (i = n, r = Ze.del(t, n)) : (this.assertChangeAnnotations(this.changeAnnotations), i = this.changeAnnotations.manage(n), r = Ze.del(t, i)), this.edits.push(r), i !== void 0) + return i; + }, e.prototype.add = function(t) { + this.edits.push(t); + }, e.prototype.all = function() { return this.edits; - }; - TextEditChangeImpl2.prototype.clear = function() { + }, e.prototype.clear = function() { this.edits.splice(0, this.edits.length); - }; - TextEditChangeImpl2.prototype.assertChangeAnnotations = function(value) { - if (value === void 0) { + }, e.prototype.assertChangeAnnotations = function(t) { + if (t === void 0) throw new Error("Text edit change is not configured to manage change annotations."); - } - }; - return TextEditChangeImpl2; -}(); -var ChangeAnnotations = function() { - function ChangeAnnotations2(annotations) { - this._annotations = annotations === void 0 ? /* @__PURE__ */ Object.create(null) : annotations; - this._counter = 0; - this._size = 0; + }, e; +}(), $a = function() { + function e(t) { + this._annotations = t === void 0 ? /* @__PURE__ */ Object.create(null) : t, this._counter = 0, this._size = 0; } - ChangeAnnotations2.prototype.all = function() { + return e.prototype.all = function() { return this._annotations; - }; - Object.defineProperty(ChangeAnnotations2.prototype, "size", { + }, Object.defineProperty(e.prototype, "size", { get: function() { return this._size; }, - enumerable: false, - configurable: true - }); - ChangeAnnotations2.prototype.manage = function(idOrAnnotation, annotation) { - var id; - if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { - id = idOrAnnotation; - } else { - id = this.nextId(); - annotation = idOrAnnotation; - } - if (this._annotations[id] !== void 0) { - throw new Error("Id " + id + " is already in use."); - } - if (annotation === void 0) { - throw new Error("No annotation provided for id " + id); - } - this._annotations[id] = annotation; - this._size++; - return id; - }; - ChangeAnnotations2.prototype.nextId = function() { - this._counter++; - return this._counter.toString(); - }; - return ChangeAnnotations2; + enumerable: !1, + configurable: !0 + }), e.prototype.manage = function(t, n) { + var r; + if (be.is(t) ? r = t : (r = this.nextId(), n = t), this._annotations[r] !== void 0) + throw new Error("Id " + r + " is already in use."); + if (n === void 0) + throw new Error("No annotation provided for id " + r); + return this._annotations[r] = n, this._size++, r; + }, e.prototype.nextId = function() { + return this._counter++, this._counter.toString(); + }, e; }(); (function() { - function WorkspaceChange2(workspaceEdit) { - var _this = this; - this._textEditChanges = /* @__PURE__ */ Object.create(null); - if (workspaceEdit !== void 0) { - this._workspaceEdit = workspaceEdit; - if (workspaceEdit.documentChanges) { - this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); - workspaceEdit.changeAnnotations = this._changeAnnotations.all(); - workspaceEdit.documentChanges.forEach(function(change) { - if (TextDocumentEdit.is(change)) { - var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); - _this._textEditChanges[change.textDocument.uri] = textEditChange; - } - }); - } else if (workspaceEdit.changes) { - Object.keys(workspaceEdit.changes).forEach(function(key) { - var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); - _this._textEditChanges[key] = textEditChange; - }); + function e(t) { + var n = this; + this._textEditChanges = /* @__PURE__ */ Object.create(null), t !== void 0 ? (this._workspaceEdit = t, t.documentChanges ? (this._changeAnnotations = new $a(t.changeAnnotations), t.changeAnnotations = this._changeAnnotations.all(), t.documentChanges.forEach(function(r) { + if (Gt.is(r)) { + var i = new ln(r.edits, n._changeAnnotations); + n._textEditChanges[r.textDocument.uri] = i; } - } else { - this._workspaceEdit = {}; - } + })) : t.changes && Object.keys(t.changes).forEach(function(r) { + var i = new ln(t.changes[r]); + n._textEditChanges[r] = i; + })) : this._workspaceEdit = {}; } - Object.defineProperty(WorkspaceChange2.prototype, "edit", { + return Object.defineProperty(e.prototype, "edit", { get: function() { - this.initDocumentChanges(); - if (this._changeAnnotations !== void 0) { - if (this._changeAnnotations.size === 0) { - this._workspaceEdit.changeAnnotations = void 0; - } else { - this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); - } - } - return this._workspaceEdit; + return this.initDocumentChanges(), this._changeAnnotations !== void 0 && (this._changeAnnotations.size === 0 ? this._workspaceEdit.changeAnnotations = void 0 : this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()), this._workspaceEdit; }, - enumerable: false, - configurable: true - }); - WorkspaceChange2.prototype.getTextEditChange = function(key) { - if (OptionalVersionedTextDocumentIdentifier.is(key)) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === void 0) { + enumerable: !1, + configurable: !0 + }), e.prototype.getTextEditChange = function(t) { + if (Rn.is(t)) { + if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); - } - var textDocument = { uri: key.uri, version: key.version }; - var result = this._textEditChanges[textDocument.uri]; - if (!result) { - var edits = []; - var textDocumentEdit = { - textDocument, - edits + var n = { uri: t.uri, version: t.version }, r = this._textEditChanges[n.uri]; + if (!r) { + var i = [], a = { + textDocument: n, + edits: i }; - this._workspaceEdit.documentChanges.push(textDocumentEdit); - result = new TextEditChangeImpl(edits, this._changeAnnotations); - this._textEditChanges[textDocument.uri] = result; + this._workspaceEdit.documentChanges.push(a), r = new ln(i, this._changeAnnotations), this._textEditChanges[n.uri] = r; } - return result; + return r; } else { - this.initChanges(); - if (this._workspaceEdit.changes === void 0) { + if (this.initChanges(), this._workspaceEdit.changes === void 0) throw new Error("Workspace edit is not configured for normal text edit changes."); + var r = this._textEditChanges[t]; + if (!r) { + var i = []; + this._workspaceEdit.changes[t] = i, r = new ln(i), this._textEditChanges[t] = r; } - var result = this._textEditChanges[key]; - if (!result) { - var edits = []; - this._workspaceEdit.changes[key] = edits; - result = new TextEditChangeImpl(edits); - this._textEditChanges[key] = result; - } - return result; + return r; } - }; - WorkspaceChange2.prototype.initDocumentChanges = function() { - if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) { - this._changeAnnotations = new ChangeAnnotations(); - this._workspaceEdit.documentChanges = []; - this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); - } - }; - WorkspaceChange2.prototype.initChanges = function() { - if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) { - this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null); - } - }; - WorkspaceChange2.prototype.createFile = function(uri, optionsOrAnnotation, options) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === void 0) { + }, e.prototype.initDocumentChanges = function() { + this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new $a(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()); + }, e.prototype.initChanges = function() { + this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null)); + }, e.prototype.createFile = function(t, n, r) { + if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); - } - var annotation; - if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { - annotation = optionsOrAnnotation; - } else { - options = optionsOrAnnotation; - } - var operation; - var id; - if (annotation === void 0) { - operation = CreateFile.create(uri, options); - } else { - id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); - operation = CreateFile.create(uri, options, id); - } - this._workspaceEdit.documentChanges.push(operation); - if (id !== void 0) { - return id; - } - }; - WorkspaceChange2.prototype.renameFile = function(oldUri, newUri, optionsOrAnnotation, options) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === void 0) { + var i; + Ft.is(n) || be.is(n) ? i = n : r = n; + var a, o; + if (i === void 0 ? a = Jt.create(t, r) : (o = be.is(i) ? i : this._changeAnnotations.manage(i), a = Jt.create(t, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0) + return o; + }, e.prototype.renameFile = function(t, n, r, i) { + if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); - } - var annotation; - if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { - annotation = optionsOrAnnotation; - } else { - options = optionsOrAnnotation; - } - var operation; - var id; - if (annotation === void 0) { - operation = RenameFile.create(oldUri, newUri, options); - } else { - id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); - operation = RenameFile.create(oldUri, newUri, options, id); - } - this._workspaceEdit.documentChanges.push(operation); - if (id !== void 0) { - return id; - } - }; - WorkspaceChange2.prototype.deleteFile = function(uri, optionsOrAnnotation, options) { - this.initDocumentChanges(); - if (this._workspaceEdit.documentChanges === void 0) { + var a; + Ft.is(r) || be.is(r) ? a = r : i = r; + var o, l; + if (a === void 0 ? o = Xt.create(t, n, i) : (l = be.is(a) ? a : this._changeAnnotations.manage(a), o = Xt.create(t, n, i, l)), this._workspaceEdit.documentChanges.push(o), l !== void 0) + return l; + }, e.prototype.deleteFile = function(t, n, r) { + if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); - } - var annotation; - if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { - annotation = optionsOrAnnotation; - } else { - options = optionsOrAnnotation; - } - var operation; - var id; - if (annotation === void 0) { - operation = DeleteFile.create(uri, options); - } else { - id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); - operation = DeleteFile.create(uri, options, id); - } - this._workspaceEdit.documentChanges.push(operation); - if (id !== void 0) { - return id; - } - }; - return WorkspaceChange2; + var i; + Ft.is(n) || be.is(n) ? i = n : r = n; + var a, o; + if (i === void 0 ? a = Yt.create(t, r) : (o = be.is(i) ? i : this._changeAnnotations.manage(i), a = Yt.create(t, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0) + return o; + }, e; })(); -var TextDocumentIdentifier; -(function(TextDocumentIdentifier2) { - function create(uri) { - return { uri }; +var Ha; +(function(e) { + function t(r) { + return { uri: r }; } - TextDocumentIdentifier2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && x.string(i.uri); } - TextDocumentIdentifier2.is = is; -})(TextDocumentIdentifier || (TextDocumentIdentifier = {})); -var VersionedTextDocumentIdentifier; -(function(VersionedTextDocumentIdentifier2) { - function create(uri, version) { - return { uri, version }; + e.is = n; +})(Ha || (Ha = {})); +var Ir; +(function(e) { + function t(r, i) { + return { uri: r, version: i }; } - VersionedTextDocumentIdentifier2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && x.string(i.uri) && x.integer(i.version); } - VersionedTextDocumentIdentifier2.is = is; -})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {})); -var OptionalVersionedTextDocumentIdentifier; -(function(OptionalVersionedTextDocumentIdentifier2) { - function create(uri, version) { - return { uri, version }; + e.is = n; +})(Ir || (Ir = {})); +var Rn; +(function(e) { + function t(r, i) { + return { uri: r, version: i }; } - OptionalVersionedTextDocumentIdentifier2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && x.string(i.uri) && (i.version === null || x.integer(i.version)); } - OptionalVersionedTextDocumentIdentifier2.is = is; -})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {})); -var TextDocumentItem; -(function(TextDocumentItem2) { - function create(uri, languageId, version, text) { - return { uri, languageId, version, text }; + e.is = n; +})(Rn || (Rn = {})); +var Ga; +(function(e) { + function t(r, i, a, o) { + return { uri: r, languageId: i, version: a, text: o }; } - TextDocumentItem2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && x.string(i.uri) && x.string(i.languageId) && x.integer(i.version) && x.string(i.text); } - TextDocumentItem2.is = is; -})(TextDocumentItem || (TextDocumentItem = {})); -var MarkupKind; -(function(MarkupKind2) { - MarkupKind2.PlainText = "plaintext"; - MarkupKind2.Markdown = "markdown"; -})(MarkupKind || (MarkupKind = {})); -(function(MarkupKind2) { - function is(value) { - var candidate = value; - return candidate === MarkupKind2.PlainText || candidate === MarkupKind2.Markdown; + e.is = n; +})(Ga || (Ga = {})); +var Ae; +(function(e) { + e.PlainText = "plaintext", e.Markdown = "markdown"; +})(Ae || (Ae = {})); +(function(e) { + function t(n) { + var r = n; + return r === e.PlainText || r === e.Markdown; } - MarkupKind2.is = is; -})(MarkupKind || (MarkupKind = {})); -var MarkupContent; -(function(MarkupContent2) { - function is(value) { - var candidate = value; - return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + e.is = t; +})(Ae || (Ae = {})); +var Lr; +(function(e) { + function t(n) { + var r = n; + return x.objectLiteral(n) && Ae.is(r.kind) && x.string(r.value); } - MarkupContent2.is = is; -})(MarkupContent || (MarkupContent = {})); -var CompletionItemKind; -(function(CompletionItemKind2) { - CompletionItemKind2.Text = 1; - CompletionItemKind2.Method = 2; - CompletionItemKind2.Function = 3; - CompletionItemKind2.Constructor = 4; - CompletionItemKind2.Field = 5; - CompletionItemKind2.Variable = 6; - CompletionItemKind2.Class = 7; - CompletionItemKind2.Interface = 8; - CompletionItemKind2.Module = 9; - CompletionItemKind2.Property = 10; - CompletionItemKind2.Unit = 11; - CompletionItemKind2.Value = 12; - CompletionItemKind2.Enum = 13; - CompletionItemKind2.Keyword = 14; - CompletionItemKind2.Snippet = 15; - CompletionItemKind2.Color = 16; - CompletionItemKind2.File = 17; - CompletionItemKind2.Reference = 18; - CompletionItemKind2.Folder = 19; - CompletionItemKind2.EnumMember = 20; - CompletionItemKind2.Constant = 21; - CompletionItemKind2.Struct = 22; - CompletionItemKind2.Event = 23; - CompletionItemKind2.Operator = 24; - CompletionItemKind2.TypeParameter = 25; -})(CompletionItemKind || (CompletionItemKind = {})); -var InsertTextFormat; -(function(InsertTextFormat2) { - InsertTextFormat2.PlainText = 1; - InsertTextFormat2.Snippet = 2; -})(InsertTextFormat || (InsertTextFormat = {})); -var CompletionItemTag; -(function(CompletionItemTag2) { - CompletionItemTag2.Deprecated = 1; -})(CompletionItemTag || (CompletionItemTag = {})); -var InsertReplaceEdit; -(function(InsertReplaceEdit2) { - function create(newText, insert, replace) { - return { newText, insert, replace }; + e.is = t; +})(Lr || (Lr = {})); +var V; +(function(e) { + e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25; +})(V || (V = {})); +var ke; +(function(e) { + e.PlainText = 1, e.Snippet = 2; +})(ke || (ke = {})); +var ot; +(function(e) { + e.Deprecated = 1; +})(ot || (ot = {})); +var Ja; +(function(e) { + function t(r, i, a) { + return { newText: r, insert: i, replace: a }; } - InsertReplaceEdit2.create = create; - function is(value) { - var candidate = value; - return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace); + e.create = t; + function n(r) { + var i = r; + return i && x.string(i.newText) && Q.is(i.insert) && Q.is(i.replace); } - InsertReplaceEdit2.is = is; -})(InsertReplaceEdit || (InsertReplaceEdit = {})); -var InsertTextMode; -(function(InsertTextMode2) { - InsertTextMode2.asIs = 1; - InsertTextMode2.adjustIndentation = 2; -})(InsertTextMode || (InsertTextMode = {})); -var CompletionItem; -(function(CompletionItem2) { - function create(label) { - return { label }; + e.is = n; +})(Ja || (Ja = {})); +var Xa; +(function(e) { + e.asIs = 1, e.adjustIndentation = 2; +})(Xa || (Xa = {})); +var Ya; +(function(e) { + function t(n) { + return { label: n }; } - CompletionItem2.create = create; -})(CompletionItem || (CompletionItem = {})); -var CompletionList; -(function(CompletionList2) { - function create(items, isIncomplete) { - return { items: items ? items : [], isIncomplete: !!isIncomplete }; + e.create = t; +})(Ya || (Ya = {})); +var Ka; +(function(e) { + function t(n, r) { + return { items: n || [], isIncomplete: !!r }; } - CompletionList2.create = create; -})(CompletionList || (CompletionList = {})); -var MarkedString; -(function(MarkedString2) { - function fromPlainText(plainText) { - return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); + e.create = t; +})(Ka || (Ka = {})); +var An; +(function(e) { + function t(r) { + return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); } - MarkedString2.fromPlainText = fromPlainText; - function is(value) { - var candidate = value; - return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value); + e.fromPlainText = t; + function n(r) { + var i = r; + return x.string(i) || x.objectLiteral(i) && x.string(i.language) && x.string(i.value); } - MarkedString2.is = is; -})(MarkedString || (MarkedString = {})); -var Hover; -(function(Hover2) { - function is(value) { - var candidate = value; - return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range)); + e.is = n; +})(An || (An = {})); +var Za; +(function(e) { + function t(n) { + var r = n; + return !!r && x.objectLiteral(r) && (Lr.is(r.contents) || An.is(r.contents) || x.typedArray(r.contents, An.is)) && (n.range === void 0 || Q.is(n.range)); } - Hover2.is = is; -})(Hover || (Hover = {})); -var ParameterInformation; -(function(ParameterInformation2) { - function create(label, documentation) { - return documentation ? { label, documentation } : { label }; + e.is = t; +})(Za || (Za = {})); +var Qa; +(function(e) { + function t(n, r) { + return r ? { label: n, documentation: r } : { label: n }; } - ParameterInformation2.create = create; -})(ParameterInformation || (ParameterInformation = {})); -var SignatureInformation; -(function(SignatureInformation2) { - function create(label, documentation) { - var parameters = []; - for (var _i = 2; _i < arguments.length; _i++) { - parameters[_i - 2] = arguments[_i]; - } - var result = { label }; - if (Is.defined(documentation)) { - result.documentation = documentation; - } - if (Is.defined(parameters)) { - result.parameters = parameters; - } else { - result.parameters = []; - } - return result; + e.create = t; +})(Qa || (Qa = {})); +var es; +(function(e) { + function t(n, r) { + for (var i = [], a = 2; a < arguments.length; a++) + i[a - 2] = arguments[a]; + var o = { label: n }; + return x.defined(r) && (o.documentation = r), x.defined(i) ? o.parameters = i : o.parameters = [], o; } - SignatureInformation2.create = create; -})(SignatureInformation || (SignatureInformation = {})); -var DocumentHighlightKind; -(function(DocumentHighlightKind2) { - DocumentHighlightKind2.Text = 1; - DocumentHighlightKind2.Read = 2; - DocumentHighlightKind2.Write = 3; -})(DocumentHighlightKind || (DocumentHighlightKind = {})); -var DocumentHighlight; -(function(DocumentHighlight2) { - function create(range, kind) { - var result = { range }; - if (Is.number(kind)) { - result.kind = kind; - } - return result; + e.create = t; +})(es || (es = {})); +var xt; +(function(e) { + e.Text = 1, e.Read = 2, e.Write = 3; +})(xt || (xt = {})); +var ts; +(function(e) { + function t(n, r) { + var i = { range: n }; + return x.number(r) && (i.kind = r), i; } - DocumentHighlight2.create = create; -})(DocumentHighlight || (DocumentHighlight = {})); -var SymbolKind; -(function(SymbolKind2) { - SymbolKind2.File = 1; - SymbolKind2.Module = 2; - SymbolKind2.Namespace = 3; - SymbolKind2.Package = 4; - SymbolKind2.Class = 5; - SymbolKind2.Method = 6; - SymbolKind2.Property = 7; - SymbolKind2.Field = 8; - SymbolKind2.Constructor = 9; - SymbolKind2.Enum = 10; - SymbolKind2.Interface = 11; - SymbolKind2.Function = 12; - SymbolKind2.Variable = 13; - SymbolKind2.Constant = 14; - SymbolKind2.String = 15; - SymbolKind2.Number = 16; - SymbolKind2.Boolean = 17; - SymbolKind2.Array = 18; - SymbolKind2.Object = 19; - SymbolKind2.Key = 20; - SymbolKind2.Null = 21; - SymbolKind2.EnumMember = 22; - SymbolKind2.Struct = 23; - SymbolKind2.Event = 24; - SymbolKind2.Operator = 25; - SymbolKind2.TypeParameter = 26; -})(SymbolKind || (SymbolKind = {})); -var SymbolTag; -(function(SymbolTag2) { - SymbolTag2.Deprecated = 1; -})(SymbolTag || (SymbolTag = {})); -var SymbolInformation; -(function(SymbolInformation2) { - function create(name, kind, range, uri, containerName) { - var result = { - name, - kind, - location: { uri, range } + e.create = t; +})(ts || (ts = {})); +var lt; +(function(e) { + e.File = 1, e.Module = 2, e.Namespace = 3, e.Package = 4, e.Class = 5, e.Method = 6, e.Property = 7, e.Field = 8, e.Constructor = 9, e.Enum = 10, e.Interface = 11, e.Function = 12, e.Variable = 13, e.Constant = 14, e.String = 15, e.Number = 16, e.Boolean = 17, e.Array = 18, e.Object = 19, e.Key = 20, e.Null = 21, e.EnumMember = 22, e.Struct = 23, e.Event = 24, e.Operator = 25, e.TypeParameter = 26; +})(lt || (lt = {})); +var ns; +(function(e) { + e.Deprecated = 1; +})(ns || (ns = {})); +var rs; +(function(e) { + function t(n, r, i, a, o) { + var l = { + name: n, + kind: r, + location: { uri: a, range: i } }; - if (containerName) { - result.containerName = containerName; - } - return result; + return o && (l.containerName = o), l; } - SymbolInformation2.create = create; -})(SymbolInformation || (SymbolInformation = {})); -var DocumentSymbol; -(function(DocumentSymbol2) { - function create(name, detail, kind, range, selectionRange, children) { - var result = { - name, - detail, - kind, - range, - selectionRange + e.create = t; +})(rs || (rs = {})); +var is; +(function(e) { + function t(r, i, a, o, l, h) { + var c = { + name: r, + detail: i, + kind: a, + range: o, + selectionRange: l }; - if (children !== void 0) { - result.children = children; - } - return result; + return h !== void 0 && (c.children = h), c; } - DocumentSymbol2.create = create; - function is(value) { - var candidate = value; - return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === void 0 || Is.string(candidate.detail)) && (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) && (candidate.children === void 0 || Array.isArray(candidate.children)) && (candidate.tags === void 0 || Array.isArray(candidate.tags)); + e.create = t; + function n(r) { + var i = r; + return i && x.string(i.name) && x.number(i.kind) && Q.is(i.range) && Q.is(i.selectionRange) && (i.detail === void 0 || x.string(i.detail)) && (i.deprecated === void 0 || x.boolean(i.deprecated)) && (i.children === void 0 || Array.isArray(i.children)) && (i.tags === void 0 || Array.isArray(i.tags)); } - DocumentSymbol2.is = is; -})(DocumentSymbol || (DocumentSymbol = {})); -var CodeActionKind; -(function(CodeActionKind2) { - CodeActionKind2.Empty = ""; - CodeActionKind2.QuickFix = "quickfix"; - CodeActionKind2.Refactor = "refactor"; - CodeActionKind2.RefactorExtract = "refactor.extract"; - CodeActionKind2.RefactorInline = "refactor.inline"; - CodeActionKind2.RefactorRewrite = "refactor.rewrite"; - CodeActionKind2.Source = "source"; - CodeActionKind2.SourceOrganizeImports = "source.organizeImports"; - CodeActionKind2.SourceFixAll = "source.fixAll"; -})(CodeActionKind || (CodeActionKind = {})); -var CodeActionContext; -(function(CodeActionContext2) { - function create(diagnostics, only) { - var result = { diagnostics }; - if (only !== void 0 && only !== null) { - result.only = only; - } - return result; + e.is = n; +})(is || (is = {})); +var Tr; +(function(e) { + e.Empty = "", e.QuickFix = "quickfix", e.Refactor = "refactor", e.RefactorExtract = "refactor.extract", e.RefactorInline = "refactor.inline", e.RefactorRewrite = "refactor.rewrite", e.Source = "source", e.SourceOrganizeImports = "source.organizeImports", e.SourceFixAll = "source.fixAll"; +})(Tr || (Tr = {})); +var as; +(function(e) { + function t(r, i) { + var a = { diagnostics: r }; + return i != null && (a.only = i), a; } - CodeActionContext2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string)); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && x.typedArray(i.diagnostics, En.is) && (i.only === void 0 || x.typedArray(i.only, x.string)); } - CodeActionContext2.is = is; -})(CodeActionContext || (CodeActionContext = {})); -var CodeAction; -(function(CodeAction2) { - function create(title, kindOrCommandOrEdit, kind) { - var result = { title }; - var checkKind = true; - if (typeof kindOrCommandOrEdit === "string") { - checkKind = false; - result.kind = kindOrCommandOrEdit; - } else if (Command.is(kindOrCommandOrEdit)) { - result.command = kindOrCommandOrEdit; - } else { - result.edit = kindOrCommandOrEdit; - } - if (checkKind && kind !== void 0) { - result.kind = kind; - } - return result; + e.is = n; +})(as || (as = {})); +var Wr; +(function(e) { + function t(r, i, a) { + var o = { title: r }, l = !0; + return typeof i == "string" ? (l = !1, o.kind = i) : Et.is(i) ? o.command = i : o.edit = i, l && a !== void 0 && (o.kind = a), o; } - CodeAction2.create = create; - function is(value) { - var candidate = value; - return candidate && Is.string(candidate.title) && (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === void 0 || Is.string(candidate.kind)) && (candidate.edit !== void 0 || candidate.command !== void 0) && (candidate.command === void 0 || Command.is(candidate.command)) && (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) && (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit)); + e.create = t; + function n(r) { + var i = r; + return i && x.string(i.title) && (i.diagnostics === void 0 || x.typedArray(i.diagnostics, En.is)) && (i.kind === void 0 || x.string(i.kind)) && (i.edit !== void 0 || i.command !== void 0) && (i.command === void 0 || Et.is(i.command)) && (i.isPreferred === void 0 || x.boolean(i.isPreferred)) && (i.edit === void 0 || Pr.is(i.edit)); } - CodeAction2.is = is; -})(CodeAction || (CodeAction = {})); -var CodeLens; -(function(CodeLens2) { - function create(range, data) { - var result = { range }; - if (Is.defined(data)) { - result.data = data; - } - return result; + e.is = n; +})(Wr || (Wr = {})); +var ss; +(function(e) { + function t(r, i) { + var a = { range: r }; + return x.defined(i) && (a.data = i), a; } - CodeLens2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && Q.is(i.range) && (x.undefined(i.command) || Et.is(i.command)); } - CodeLens2.is = is; -})(CodeLens || (CodeLens = {})); -var FormattingOptions; -(function(FormattingOptions2) { - function create(tabSize, insertSpaces) { - return { tabSize, insertSpaces }; + e.is = n; +})(ss || (ss = {})); +var os; +(function(e) { + function t(r, i) { + return { tabSize: r, insertSpaces: i }; } - FormattingOptions2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && x.uinteger(i.tabSize) && x.boolean(i.insertSpaces); } - FormattingOptions2.is = is; -})(FormattingOptions || (FormattingOptions = {})); -var DocumentLink; -(function(DocumentLink2) { - function create(range, target, data) { - return { range, target, data }; + e.is = n; +})(os || (os = {})); +var ls; +(function(e) { + function t(r, i, a) { + return { range: r, target: i, data: a }; } - DocumentLink2.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + e.create = t; + function n(r) { + var i = r; + return x.defined(i) && Q.is(i.range) && (x.undefined(i.target) || x.string(i.target)); } - DocumentLink2.is = is; -})(DocumentLink || (DocumentLink = {})); -var SelectionRange; -(function(SelectionRange2) { - function create(range, parent) { - return { range, parent }; + e.is = n; +})(ls || (ls = {})); +var zn; +(function(e) { + function t(r, i) { + return { range: r, parent: i }; } - SelectionRange2.create = create; - function is(value) { - var candidate = value; - return candidate !== void 0 && Range.is(candidate.range) && (candidate.parent === void 0 || SelectionRange2.is(candidate.parent)); + e.create = t; + function n(r) { + var i = r; + return i !== void 0 && Q.is(i.range) && (i.parent === void 0 || e.is(i.parent)); } - SelectionRange2.is = is; -})(SelectionRange || (SelectionRange = {})); -var TextDocument; -(function(TextDocument3) { - function create(uri, languageId, version, content) { - return new FullTextDocument(uri, languageId, version, content); + e.is = n; +})(zn || (zn = {})); +var cs; +(function(e) { + function t(a, o, l, h) { + return new fh(a, o, l, h); } - TextDocument3.create = create; - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + e.create = t; + function n(a) { + var o = a; + return !!(x.defined(o) && x.string(o.uri) && (x.undefined(o.languageId) || x.string(o.languageId)) && x.uinteger(o.lineCount) && x.func(o.getText) && x.func(o.positionAt) && x.func(o.offsetAt)); } - TextDocument3.is = is; - function applyEdits(document, edits) { - var text = document.getText(); - var sortedEdits = mergeSort2(edits, function(a2, b) { - var diff = a2.range.start.line - b.range.start.line; - if (diff === 0) { - return a2.range.start.character - b.range.start.character; - } - return diff; - }); - var lastModifiedOffset = text.length; - for (var i = sortedEdits.length - 1; i >= 0; i--) { - var e = sortedEdits[i]; - var startOffset = document.offsetAt(e.range.start); - var endOffset = document.offsetAt(e.range.end); - if (endOffset <= lastModifiedOffset) { - text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length); - } else { + e.is = n; + function r(a, o) { + for (var l = a.getText(), h = i(o, function(w, b) { + var y = w.range.start.line - b.range.start.line; + return y === 0 ? w.range.start.character - b.range.start.character : y; + }), c = l.length, d = h.length - 1; d >= 0; d--) { + var p = h[d], f = a.offsetAt(p.range.start), g = a.offsetAt(p.range.end); + if (g <= c) + l = l.substring(0, f) + p.newText + l.substring(g, l.length); + else throw new Error("Overlapping edit"); - } - lastModifiedOffset = startOffset; + c = f; } - return text; + return l; } - TextDocument3.applyEdits = applyEdits; - function mergeSort2(data, compare) { - if (data.length <= 1) { - return data; + e.applyEdits = r; + function i(a, o) { + if (a.length <= 1) + return a; + var l = a.length / 2 | 0, h = a.slice(0, l), c = a.slice(l); + i(h, o), i(c, o); + for (var d = 0, p = 0, f = 0; d < h.length && p < c.length; ) { + var g = o(h[d], c[p]); + g <= 0 ? a[f++] = h[d++] : a[f++] = c[p++]; } - var p = data.length / 2 | 0; - var left = data.slice(0, p); - var right = data.slice(p); - mergeSort2(left, compare); - mergeSort2(right, compare); - var leftIdx = 0; - var rightIdx = 0; - var i = 0; - while (leftIdx < left.length && rightIdx < right.length) { - var ret = compare(left[leftIdx], right[rightIdx]); - if (ret <= 0) { - data[i++] = left[leftIdx++]; - } else { - data[i++] = right[rightIdx++]; - } - } - while (leftIdx < left.length) { - data[i++] = left[leftIdx++]; - } - while (rightIdx < right.length) { - data[i++] = right[rightIdx++]; - } - return data; + for (; d < h.length; ) + a[f++] = h[d++]; + for (; p < c.length; ) + a[f++] = c[p++]; + return a; } -})(TextDocument || (TextDocument = {})); -var FullTextDocument = function() { - function FullTextDocument3(uri, languageId, version, content) { - this._uri = uri; - this._languageId = languageId; - this._version = version; - this._content = content; - this._lineOffsets = void 0; +})(cs || (cs = {})); +var fh = function() { + function e(t, n, r, i) { + this._uri = t, this._languageId = n, this._version = r, this._content = i, this._lineOffsets = void 0; } - Object.defineProperty(FullTextDocument3.prototype, "uri", { + return Object.defineProperty(e.prototype, "uri", { get: function() { return this._uri; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(FullTextDocument3.prototype, "languageId", { + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "languageId", { get: function() { return this._languageId; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(FullTextDocument3.prototype, "version", { + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "version", { get: function() { return this._version; }, - enumerable: false, - configurable: true - }); - FullTextDocument3.prototype.getText = function(range) { - if (range) { - var start = this.offsetAt(range.start); - var end = this.offsetAt(range.end); - return this._content.substring(start, end); + enumerable: !1, + configurable: !0 + }), e.prototype.getText = function(t) { + if (t) { + var n = this.offsetAt(t.start), r = this.offsetAt(t.end); + return this._content.substring(n, r); } return this._content; - }; - FullTextDocument3.prototype.update = function(event, version) { - this._content = event.text; - this._version = version; - this._lineOffsets = void 0; - }; - FullTextDocument3.prototype.getLineOffsets = function() { + }, e.prototype.update = function(t, n) { + this._content = t.text, this._version = n, this._lineOffsets = void 0; + }, e.prototype.getLineOffsets = function() { if (this._lineOffsets === void 0) { - var lineOffsets = []; - var text = this._content; - var isLineStart = true; - for (var i = 0; i < text.length; i++) { - if (isLineStart) { - lineOffsets.push(i); - isLineStart = false; - } - var ch = text.charAt(i); - isLineStart = ch === "\r" || ch === "\n"; - if (ch === "\r" && i + 1 < text.length && text.charAt(i + 1) === "\n") { - i++; - } + for (var t = [], n = this._content, r = !0, i = 0; i < n.length; i++) { + r && (t.push(i), r = !1); + var a = n.charAt(i); + r = a === "\r" || a === ` +`, a === "\r" && i + 1 < n.length && n.charAt(i + 1) === ` +` && i++; } - if (isLineStart && text.length > 0) { - lineOffsets.push(text.length); - } - this._lineOffsets = lineOffsets; + r && n.length > 0 && t.push(n.length), this._lineOffsets = t; } return this._lineOffsets; - }; - FullTextDocument3.prototype.positionAt = function(offset) { - offset = Math.max(Math.min(offset, this._content.length), 0); - var lineOffsets = this.getLineOffsets(); - var low = 0, high = lineOffsets.length; - if (high === 0) { - return Position.create(0, offset); + }, e.prototype.positionAt = function(t) { + t = Math.max(Math.min(t, this._content.length), 0); + var n = this.getLineOffsets(), r = 0, i = n.length; + if (i === 0) + return Fe.create(0, t); + for (; r < i; ) { + var a = Math.floor((r + i) / 2); + n[a] > t ? i = a : r = a + 1; } - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (lineOffsets[mid] > offset) { - high = mid; - } else { - low = mid + 1; - } - } - var line = low - 1; - return Position.create(line, offset - lineOffsets[line]); - }; - FullTextDocument3.prototype.offsetAt = function(position) { - var lineOffsets = this.getLineOffsets(); - if (position.line >= lineOffsets.length) { + var o = r - 1; + return Fe.create(o, t - n[o]); + }, e.prototype.offsetAt = function(t) { + var n = this.getLineOffsets(); + if (t.line >= n.length) return this._content.length; - } else if (position.line < 0) { + if (t.line < 0) return 0; - } - var lineOffset = lineOffsets[position.line]; - var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length; - return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); - }; - Object.defineProperty(FullTextDocument3.prototype, "lineCount", { + var r = n[t.line], i = t.line + 1 < n.length ? n[t.line + 1] : this._content.length; + return Math.max(Math.min(r + t.character, i), r); + }, Object.defineProperty(e.prototype, "lineCount", { get: function() { return this.getLineOffsets().length; }, - enumerable: false, - configurable: true - }); - return FullTextDocument3; -}(); -var Is; -(function(Is2) { - var toString = Object.prototype.toString; - function defined(value) { - return typeof value !== "undefined"; + enumerable: !1, + configurable: !0 + }), e; +}(), x; +(function(e) { + var t = Object.prototype.toString; + function n(g) { + return typeof g < "u"; } - Is2.defined = defined; - function undefined2(value) { - return typeof value === "undefined"; + e.defined = n; + function r(g) { + return typeof g > "u"; } - Is2.undefined = undefined2; - function boolean(value) { - return value === true || value === false; + e.undefined = r; + function i(g) { + return g === !0 || g === !1; } - Is2.boolean = boolean; - function string(value) { - return toString.call(value) === "[object String]"; + e.boolean = i; + function a(g) { + return t.call(g) === "[object String]"; } - Is2.string = string; - function number(value) { - return toString.call(value) === "[object Number]"; + e.string = a; + function o(g) { + return t.call(g) === "[object Number]"; } - Is2.number = number; - function numberRange(value, min, max) { - return toString.call(value) === "[object Number]" && min <= value && value <= max; + e.number = o; + function l(g, w, b) { + return t.call(g) === "[object Number]" && w <= g && g <= b; } - Is2.numberRange = numberRange; - function integer2(value) { - return toString.call(value) === "[object Number]" && -2147483648 <= value && value <= 2147483647; + e.numberRange = l; + function h(g) { + return t.call(g) === "[object Number]" && -2147483648 <= g && g <= 2147483647; } - Is2.integer = integer2; - function uinteger2(value) { - return toString.call(value) === "[object Number]" && 0 <= value && value <= 2147483647; + e.integer = h; + function c(g) { + return t.call(g) === "[object Number]" && 0 <= g && g <= 2147483647; } - Is2.uinteger = uinteger2; - function func(value) { - return toString.call(value) === "[object Function]"; + e.uinteger = c; + function d(g) { + return t.call(g) === "[object Function]"; } - Is2.func = func; - function objectLiteral(value) { - return value !== null && typeof value === "object"; + e.func = d; + function p(g) { + return g !== null && typeof g == "object"; } - Is2.objectLiteral = objectLiteral; - function typedArray(value, check) { - return Array.isArray(value) && value.every(check); + e.objectLiteral = p; + function f(g, w) { + return Array.isArray(g) && g.every(w); } - Is2.typedArray = typedArray; -})(Is || (Is = {})); -var FullTextDocument2 = class { - constructor(uri, languageId, version, content) { - this._uri = uri; - this._languageId = languageId; - this._version = version; - this._content = content; - this._lineOffsets = void 0; + e.typedArray = f; +})(x || (x = {})); +var Mn = 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; @@ -11285,220 +7123,149 @@ var FullTextDocument2 = class { get version() { return this._version; } - getText(range) { - if (range) { - const start = this.offsetAt(range.start); - const end = this.offsetAt(range.end); - return this._content.substring(start, end); + getText(e) { + if (e) { + const t = this.offsetAt(e.start), n = this.offsetAt(e.end); + return this._content.substring(t, n); } return this._content; } - update(changes, version) { - for (let change of changes) { - if (FullTextDocument2.isIncremental(change)) { - const range = getWellformedRange(change.range); - const startOffset = this.offsetAt(range.start); - const endOffset = this.offsetAt(range.end); - this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length); - const startLine = Math.max(range.start.line, 0); - const endLine = Math.max(range.end.line, 0); - let lineOffsets = this._lineOffsets; - const addedLineOffsets = computeLineOffsets(change.text, false, startOffset); - if (endLine - startLine === addedLineOffsets.length) { - for (let i = 0, len = addedLineOffsets.length; i < len; i++) { - lineOffsets[i + startLine + 1] = addedLineOffsets[i]; - } - } else { - if (addedLineOffsets.length < 1e4) { - lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets); - } else { - this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1)); - } - } - const diff = change.text.length - (endOffset - startOffset); - if (diff !== 0) { - for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) { - lineOffsets[i] = lineOffsets[i] + diff; - } - } - } else if (FullTextDocument2.isFull(change)) { - this._content = change.text; - this._lineOffsets = void 0; - } else { + update(e, t) { + for (let n of e) + if (Mn.isIncremental(n)) { + const r = vo(n.range), i = this.offsetAt(r.start), a = this.offsetAt(r.end); + this._content = this._content.substring(0, i) + n.text + this._content.substring(a, this._content.length); + const o = Math.max(r.start.line, 0), l = Math.max(r.end.line, 0); + let h = this._lineOffsets; + const c = hs(n.text, !1, i); + if (l - o === c.length) + for (let p = 0, f = c.length; p < f; p++) + h[p + o + 1] = c[p]; + else + c.length < 1e4 ? h.splice(o + 1, l - o, ...c) : this._lineOffsets = h = h.slice(0, o + 1).concat(c, h.slice(l + 1)); + const d = n.text.length - (a - i); + if (d !== 0) + for (let p = o + 1 + c.length, f = h.length; p < f; p++) + h[p] = h[p] + d; + } else if (Mn.isFull(n)) + this._content = n.text, this._lineOffsets = void 0; + else throw new Error("Unknown change event received"); - } - } - this._version = version; + this._version = t; } getLineOffsets() { - if (this._lineOffsets === void 0) { - this._lineOffsets = computeLineOffsets(this._content, true); - } - return this._lineOffsets; + return this._lineOffsets === void 0 && (this._lineOffsets = hs(this._content, !0)), this._lineOffsets; } - positionAt(offset) { - offset = Math.max(Math.min(offset, this._content.length), 0); - let lineOffsets = this.getLineOffsets(); - let low = 0, high = lineOffsets.length; - if (high === 0) { - return { line: 0, character: offset }; + positionAt(e) { + e = Math.max(Math.min(e, this._content.length), 0); + let t = this.getLineOffsets(), n = 0, r = t.length; + if (r === 0) + return { line: 0, character: e }; + for (; n < r; ) { + let a = Math.floor((n + r) / 2); + t[a] > e ? r = a : n = a + 1; } - while (low < high) { - let mid = Math.floor((low + high) / 2); - if (lineOffsets[mid] > offset) { - high = mid; - } else { - low = mid + 1; - } - } - let line = low - 1; - return { line, character: offset - lineOffsets[line] }; + let i = n - 1; + return { line: i, character: e - t[i] }; } - offsetAt(position) { - let lineOffsets = this.getLineOffsets(); - if (position.line >= lineOffsets.length) { + offsetAt(e) { + let t = this.getLineOffsets(); + if (e.line >= t.length) return this._content.length; - } else if (position.line < 0) { + if (e.line < 0) return 0; - } - let lineOffset = lineOffsets[position.line]; - let nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length; - return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + let n = t[e.line], r = e.line + 1 < t.length ? t[e.line + 1] : this._content.length; + return Math.max(Math.min(n + e.character, r), n); } get lineCount() { return this.getLineOffsets().length; } - static isIncremental(event) { - let candidate = event; - return candidate !== void 0 && candidate !== null && typeof candidate.text === "string" && candidate.range !== void 0 && (candidate.rangeLength === void 0 || typeof candidate.rangeLength === "number"); + static isIncremental(e) { + let t = e; + return t != null && typeof t.text == "string" && t.range !== void 0 && (t.rangeLength === void 0 || typeof t.rangeLength == "number"); } - static isFull(event) { - let candidate = event; - return candidate !== void 0 && candidate !== null && typeof candidate.text === "string" && candidate.range === void 0 && candidate.rangeLength === void 0; + static isFull(e) { + let t = e; + return t != null && typeof t.text == "string" && t.range === void 0 && t.rangeLength === void 0; } -}; -var TextDocument2; -(function(TextDocument3) { - function create(uri, languageId, version, content) { - return new FullTextDocument2(uri, languageId, version, content); +}, Or; +(function(e) { + function t(i, a, o, l) { + return new Mn(i, a, o, l); } - TextDocument3.create = create; - function update(document, changes, version) { - if (document instanceof FullTextDocument2) { - document.update(changes, version); - return document; - } else { - throw new Error("TextDocument.update: document must be created by TextDocument.create"); - } + e.create = t; + function n(i, a, o) { + if (i instanceof Mn) + return i.update(a, o), i; + throw new Error("TextDocument.update: document must be created by TextDocument.create"); } - TextDocument3.update = update; - function applyEdits(document, edits) { - let text = document.getText(); - let sortedEdits = mergeSort(edits.map(getWellformedEdit), (a2, b) => { - let diff = a2.range.start.line - b.range.start.line; - if (diff === 0) { - return a2.range.start.character - b.range.start.character; - } - return diff; - }); - let lastModifiedOffset = 0; - const spans = []; - for (const e of sortedEdits) { - let startOffset = document.offsetAt(e.range.start); - if (startOffset < lastModifiedOffset) { + e.update = n; + function r(i, a) { + let o = i.getText(), l = Vr(a.map(mh), (d, p) => { + let f = d.range.start.line - p.range.start.line; + return f === 0 ? d.range.start.character - p.range.start.character : f; + }), h = 0; + const c = []; + for (const d of l) { + let p = i.offsetAt(d.range.start); + if (p < h) throw new Error("Overlapping edit"); - } else if (startOffset > lastModifiedOffset) { - spans.push(text.substring(lastModifiedOffset, startOffset)); - } - if (e.newText.length) { - spans.push(e.newText); - } - lastModifiedOffset = document.offsetAt(e.range.end); + p > h && c.push(o.substring(h, p)), d.newText.length && c.push(d.newText), h = i.offsetAt(d.range.end); } - spans.push(text.substr(lastModifiedOffset)); - return spans.join(""); + return c.push(o.substr(h)), c.join(""); } - TextDocument3.applyEdits = applyEdits; -})(TextDocument2 || (TextDocument2 = {})); -function mergeSort(data, compare) { - if (data.length <= 1) { - return data; - } - const p = data.length / 2 | 0; - const left = data.slice(0, p); - const right = data.slice(p); - mergeSort(left, compare); - mergeSort(right, compare); - let leftIdx = 0; - let rightIdx = 0; - let i = 0; - while (leftIdx < left.length && rightIdx < right.length) { - let ret = compare(left[leftIdx], right[rightIdx]); - if (ret <= 0) { - data[i++] = left[leftIdx++]; - } else { - data[i++] = right[rightIdx++]; - } - } - while (leftIdx < left.length) { - data[i++] = left[leftIdx++]; - } - while (rightIdx < right.length) { - data[i++] = right[rightIdx++]; - } - return data; + e.applyEdits = r; +})(Or || (Or = {})); +function Vr(e, t) { + if (e.length <= 1) + return e; + const n = e.length / 2 | 0, r = e.slice(0, n), i = e.slice(n); + Vr(r, t), Vr(i, t); + let a = 0, o = 0, l = 0; + for (; a < r.length && o < i.length; ) + t(r[a], i[o]) <= 0 ? e[l++] = r[a++] : e[l++] = i[o++]; + for (; a < r.length; ) + e[l++] = r[a++]; + for (; o < i.length; ) + e[l++] = i[o++]; + return e; } -function computeLineOffsets(text, isAtLineStart, textOffset = 0) { - const result = isAtLineStart ? [textOffset] : []; - for (let i = 0; i < text.length; i++) { - let ch = text.charCodeAt(i); - if (ch === 13 || ch === 10) { - if (ch === 13 && i + 1 < text.length && text.charCodeAt(i + 1) === 10) { - i++; - } - result.push(textOffset + i + 1); - } +function hs(e, t, n = 0) { + const r = t ? [n] : []; + for (let i = 0; i < e.length; i++) { + let a = e.charCodeAt(i); + (a === 13 || a === 10) && (a === 13 && i + 1 < e.length && e.charCodeAt(i + 1) === 10 && i++, r.push(n + i + 1)); } - return result; + return r; } -function getWellformedRange(range) { - const start = range.start; - const end = range.end; - if (start.line > end.line || start.line === end.line && start.character > end.character) { - return { start: end, end: start }; - } - return range; +function vo(e) { + const t = e.start, n = e.end; + return t.line > n.line || t.line === n.line && t.character > n.character ? { start: n, end: t } : e; } -function getWellformedEdit(textEdit) { - const range = getWellformedRange(textEdit.range); - if (range !== textEdit.range) { - return { newText: textEdit.newText, range }; - } - return textEdit; +function mh(e) { + const t = vo(e.range); + return t !== e.range ? { newText: e.newText, range: t } : e; } -var ClientCapabilities; -(function(ClientCapabilities2) { - ClientCapabilities2.LATEST = { +var ds; +(function(e) { + e.LATEST = { textDocument: { completion: { completionItem: { - documentationFormat: [MarkupKind.Markdown, MarkupKind.PlainText] + documentationFormat: [Ae.Markdown, Ae.PlainText] } }, hover: { - contentFormat: [MarkupKind.Markdown, MarkupKind.PlainText] + contentFormat: [Ae.Markdown, Ae.PlainText] } } }; -})(ClientCapabilities || (ClientCapabilities = {})); -var FileType; -(function(FileType2) { - FileType2[FileType2["Unknown"] = 0] = "Unknown"; - FileType2[FileType2["File"] = 1] = "File"; - FileType2[FileType2["Directory"] = 2] = "Directory"; - FileType2[FileType2["SymbolicLink"] = 64] = "SymbolicLink"; -})(FileType || (FileType = {})); -var browserNames = { +})(ds || (ds = {})); +var Kt; +(function(e) { + e[e.Unknown = 0] = "Unknown", e[e.File = 1] = "File", e[e.Directory = 2] = "Directory", e[e.SymbolicLink = 64] = "SymbolicLink"; +})(Kt || (Kt = {})); +var us = { E: "Edge", FF: "Firefox", S: "Safari", @@ -11506,132 +7273,89 @@ var browserNames = { IE: "IE", O: "Opera" }; -function getEntryStatus(status) { - switch (status) { +function yo(e) { + switch (e) { case "experimental": - return "\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F\n\n"; + return `\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F + +`; case "nonstandard": - return "\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it.\n\n"; + return `\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it. + +`; case "obsolete": - return "\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it.\n\n"; + return `\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it. + +`; default: return ""; } } -function getEntryDescription(entry, doesSupportMarkdown, settings) { - var result; - if (doesSupportMarkdown) { - result = { - kind: "markdown", - value: getEntryMarkdownDescription(entry, settings) - }; - } else { - result = { - kind: "plaintext", - value: getEntryStringDescription(entry, settings) - }; - } - if (result.value === "") { - return void 0; - } - return result; +function et(e, t, n) { + var r; + if (t ? r = { + kind: "markdown", + value: bh(e, n) + } : r = { + kind: "plaintext", + value: gh(e, n) + }, r.value !== "") + return r; } -function textToMarkedString(text) { - text = text.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); - return text.replace(//g, ">"); +function cn(e) { + return e = e.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"), e.replace(//g, ">"); } -function getEntryStringDescription(entry, settings) { - if (!entry.description || entry.description === "") { +function gh(e, t) { + if (!e.description || e.description === "") return ""; + if (typeof e.description != "string") + return e.description.value; + var n = ""; + if ((t == null ? void 0 : t.documentation) !== !1) { + e.status && (n += yo(e.status)), n += e.description; + var r = wo(e.browsers); + r && (n += ` +(` + r + ")"), "syntax" in e && (n += ` + +Syntax: `.concat(e.syntax)); } - if (typeof entry.description !== "string") { - return entry.description.value; - } - var result = ""; - if ((settings === null || settings === void 0 ? void 0 : settings.documentation) !== false) { - if (entry.status) { - result += getEntryStatus(entry.status); - } - result += entry.description; - var browserLabel = getBrowserLabel(entry.browsers); - if (browserLabel) { - result += "\n(" + browserLabel + ")"; - } - if ("syntax" in entry) { - result += "\n\nSyntax: ".concat(entry.syntax); - } - } - if (entry.references && entry.references.length > 0 && (settings === null || settings === void 0 ? void 0 : settings.references) !== false) { - if (result.length > 0) { - result += "\n\n"; - } - result += entry.references.map(function(r) { - return "".concat(r.name, ": ").concat(r.url); - }).join(" | "); - } - return result; + return e.references && e.references.length > 0 && (t == null ? void 0 : t.references) !== !1 && (n.length > 0 && (n += ` + +`), n += e.references.map(function(i) { + return "".concat(i.name, ": ").concat(i.url); + }).join(" | ")), n; } -function getEntryMarkdownDescription(entry, settings) { - if (!entry.description || entry.description === "") { +function bh(e, t) { + if (!e.description || e.description === "") return ""; + var n = ""; + if ((t == null ? void 0 : t.documentation) !== !1) { + e.status && (n += yo(e.status)), typeof e.description == "string" ? n += cn(e.description) : n += e.description.kind === Ae.Markdown ? e.description.value : cn(e.description.value); + var r = wo(e.browsers); + r && (n += ` + +(` + cn(r) + ")"), "syntax" in e && e.syntax && (n += ` + +Syntax: `.concat(cn(e.syntax))); } - var result = ""; - if ((settings === null || settings === void 0 ? void 0 : settings.documentation) !== false) { - if (entry.status) { - result += getEntryStatus(entry.status); - } - if (typeof entry.description === "string") { - result += textToMarkedString(entry.description); - } else { - result += entry.description.kind === MarkupKind.Markdown ? entry.description.value : textToMarkedString(entry.description.value); - } - var browserLabel = getBrowserLabel(entry.browsers); - if (browserLabel) { - result += "\n\n(" + textToMarkedString(browserLabel) + ")"; - } - if ("syntax" in entry && entry.syntax) { - result += "\n\nSyntax: ".concat(textToMarkedString(entry.syntax)); - } - } - if (entry.references && entry.references.length > 0 && (settings === null || settings === void 0 ? void 0 : settings.references) !== false) { - if (result.length > 0) { - result += "\n\n"; - } - result += entry.references.map(function(r) { - return "[".concat(r.name, "](").concat(r.url, ")"); - }).join(" | "); - } - return result; + return e.references && e.references.length > 0 && (t == null ? void 0 : t.references) !== !1 && (n.length > 0 && (n += ` + +`), n += e.references.map(function(i) { + return "[".concat(i.name, "](").concat(i.url, ")"); + }).join(" | ")), n; } -function getBrowserLabel(browsers) { - if (browsers === void 0) { - browsers = []; - } - if (browsers.length === 0) { - return null; - } - return browsers.map(function(b) { - var result = ""; - var matches2 = b.match(/([A-Z]+)(\d+)?/); - var name = matches2[1]; - var version = matches2[2]; - if (name in browserNames) { - result += browserNames[name]; - } - if (version) { - result += " " + version; - } - return result; +function wo(e) { + return e === void 0 && (e = []), e.length === 0 ? null : e.map(function(t) { + var n = "", r = t.match(/([A-Z]+)(\d+)?/), i = r[1], a = r[2]; + return i in us && (n += us[i]), a && (n += " " + a), n; }).join(", "); } -var localize3 = loadMessageBundle(); -var colorFunctions = [ - { func: "rgb($red, $green, $blue)", desc: localize3("css.builtin.rgb", "Creates a Color from red, green, and blue values.") }, - { func: "rgba($red, $green, $blue, $alpha)", desc: localize3("css.builtin.rgba", "Creates a Color from red, green, blue, and alpha values.") }, - { func: "hsl($hue, $saturation, $lightness)", desc: localize3("css.builtin.hsl", "Creates a Color from hue, saturation, and lightness values.") }, - { func: "hsla($hue, $saturation, $lightness, $alpha)", desc: localize3("css.builtin.hsla", "Creates a Color from hue, saturation, lightness, and alpha values.") } -]; -var colors = { +var hn = Le(), vh = [ + { func: "rgb($red, $green, $blue)", desc: hn("css.builtin.rgb", "Creates a Color from red, green, and blue values.") }, + { func: "rgba($red, $green, $blue, $alpha)", desc: hn("css.builtin.rgba", "Creates a Color from red, green, blue, and alpha values.") }, + { func: "hsl($hue, $saturation, $lightness)", desc: hn("css.builtin.hsl", "Creates a Color from hue, saturation, and lightness values.") }, + { func: "hsla($hue, $saturation, $lightness, $alpha)", desc: hn("css.builtin.hsla", "Creates a Color from hue, saturation, lightness, and alpha values.") } +], Nn = { aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#00ffff", @@ -11780,284 +7504,204 @@ var colors = { whitesmoke: "#f5f5f5", yellow: "#ffff00", yellowgreen: "#9acd32" +}, ps = { + 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." }; -var colorKeywords = { - "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." -}; -function getNumericValue(node, factor) { - var val = node.getText(); - var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/); - if (m) { - if (m[2]) { - factor = 100; - } - var result = parseFloat(m[1]) / factor; - if (result >= 0 && result <= 1) { - return result; - } +function vt(e, t) { + var n = e.getText(), r = n.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/); + if (r) { + r[2] && (t = 100); + var i = parseFloat(r[1]) / t; + if (i >= 0 && i <= 1) + return i; } throw new Error(); } -function getAngle(node) { - var val = node.getText(); - var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/); - if (m) { - switch (m[2]) { +function yh(e) { + var t = e.getText(), n = t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/); + if (n) + switch (n[2]) { case "deg": - return parseFloat(val) % 360; + return parseFloat(t) % 360; case "rad": - return parseFloat(val) * 180 / Math.PI % 360; + return parseFloat(t) * 180 / Math.PI % 360; case "grad": - return parseFloat(val) * 0.9 % 360; + return parseFloat(t) * 0.9 % 360; case "turn": - return parseFloat(val) * 360 % 360; + return parseFloat(t) * 360 % 360; default: - if (typeof m[2] === "undefined") { - return parseFloat(val) % 360; - } + if (typeof n[2] > "u") + return parseFloat(t) % 360; } - } throw new Error(); } -function isColorConstructor(node) { - var name = node.getName(); - if (!name) { - return false; - } - return /^(rgb|rgba|hsl|hsla)$/gi.test(name); +function wh(e) { + var t = e.getName(); + return t ? /^(rgb|rgba|hsl|hsla)$/gi.test(t) : !1; } -var Digit0 = 48; -var Digit9 = 57; -var A = 65; -var a = 97; -var f = 102; -function hexDigit(charCode) { - if (charCode < Digit0) { - return 0; - } - if (charCode <= Digit9) { - return charCode - Digit0; - } - if (charCode < a) { - charCode += a - A; - } - if (charCode >= a && charCode <= f) { - return charCode - a + 10; - } - return 0; +var fs = 48, xh = 57, Sh = 65, dn = 97, Ch = 102; +function ae(e) { + return e < fs ? 0 : e <= xh ? e - fs : (e < dn && (e += dn - Sh), e >= dn && e <= Ch ? e - dn + 10 : 0); } -function colorFromHex(text) { - if (text[0] !== "#") { +function ms(e) { + if (e[0] !== "#") return null; - } - switch (text.length) { + switch (e.length) { case 4: return { - red: hexDigit(text.charCodeAt(1)) * 17 / 255, - green: hexDigit(text.charCodeAt(2)) * 17 / 255, - blue: hexDigit(text.charCodeAt(3)) * 17 / 255, + red: ae(e.charCodeAt(1)) * 17 / 255, + green: ae(e.charCodeAt(2)) * 17 / 255, + blue: ae(e.charCodeAt(3)) * 17 / 255, alpha: 1 }; case 5: return { - red: hexDigit(text.charCodeAt(1)) * 17 / 255, - green: hexDigit(text.charCodeAt(2)) * 17 / 255, - blue: hexDigit(text.charCodeAt(3)) * 17 / 255, - alpha: hexDigit(text.charCodeAt(4)) * 17 / 255 + red: ae(e.charCodeAt(1)) * 17 / 255, + green: ae(e.charCodeAt(2)) * 17 / 255, + blue: ae(e.charCodeAt(3)) * 17 / 255, + alpha: ae(e.charCodeAt(4)) * 17 / 255 }; case 7: return { - red: (hexDigit(text.charCodeAt(1)) * 16 + hexDigit(text.charCodeAt(2))) / 255, - green: (hexDigit(text.charCodeAt(3)) * 16 + hexDigit(text.charCodeAt(4))) / 255, - blue: (hexDigit(text.charCodeAt(5)) * 16 + hexDigit(text.charCodeAt(6))) / 255, + red: (ae(e.charCodeAt(1)) * 16 + ae(e.charCodeAt(2))) / 255, + green: (ae(e.charCodeAt(3)) * 16 + ae(e.charCodeAt(4))) / 255, + blue: (ae(e.charCodeAt(5)) * 16 + ae(e.charCodeAt(6))) / 255, alpha: 1 }; case 9: return { - red: (hexDigit(text.charCodeAt(1)) * 16 + hexDigit(text.charCodeAt(2))) / 255, - green: (hexDigit(text.charCodeAt(3)) * 16 + hexDigit(text.charCodeAt(4))) / 255, - blue: (hexDigit(text.charCodeAt(5)) * 16 + hexDigit(text.charCodeAt(6))) / 255, - alpha: (hexDigit(text.charCodeAt(7)) * 16 + hexDigit(text.charCodeAt(8))) / 255 + red: (ae(e.charCodeAt(1)) * 16 + ae(e.charCodeAt(2))) / 255, + green: (ae(e.charCodeAt(3)) * 16 + ae(e.charCodeAt(4))) / 255, + blue: (ae(e.charCodeAt(5)) * 16 + ae(e.charCodeAt(6))) / 255, + alpha: (ae(e.charCodeAt(7)) * 16 + ae(e.charCodeAt(8))) / 255 }; } return null; } -function colorFromHSL(hue, sat, light, alpha) { - if (alpha === void 0) { - alpha = 1; - } - hue = hue / 60; - if (sat === 0) { - return { red: light, green: light, blue: light, alpha }; - } else { - var hueToRgb = function(t12, t22, hue2) { - while (hue2 < 0) { - hue2 += 6; - } - while (hue2 >= 6) { - hue2 -= 6; - } - if (hue2 < 1) { - return (t22 - t12) * hue2 + t12; - } - if (hue2 < 3) { - return t22; - } - if (hue2 < 4) { - return (t22 - t12) * (4 - hue2) + t12; - } - return t12; - }; - var t2 = light <= 0.5 ? light * (sat + 1) : light + sat - light * sat; - var t1 = light * 2 - t2; - return { red: hueToRgb(t1, t2, hue + 2), green: hueToRgb(t1, t2, hue), blue: hueToRgb(t1, t2, hue - 2), alpha }; - } +function kh(e, t, n, r) { + if (r === void 0 && (r = 1), e = e / 60, t === 0) + return { red: n, green: n, blue: n, alpha: r }; + var i = function(l, h, c) { + for (; c < 0; ) + c += 6; + for (; c >= 6; ) + c -= 6; + return c < 1 ? (h - l) * c + l : c < 3 ? h : c < 4 ? (h - l) * (4 - c) + l : l; + }, a = n <= 0.5 ? n * (t + 1) : n + t - n * t, o = n * 2 - a; + return { red: i(o, a, e + 2), green: i(o, a, e), blue: i(o, a, e - 2), alpha: r }; } -function hslFromColor(rgba) { - var r = rgba.red; - var g = rgba.green; - var b = rgba.blue; - var a2 = rgba.alpha; - var max = Math.max(r, g, b); - var min = Math.min(r, g, b); - var h = 0; - var s = 0; - var l = (min + max) / 2; - var chroma = max - min; - if (chroma > 0) { - s = Math.min(l <= 0.5 ? chroma / (2 * l) : chroma / (2 - 2 * l), 1); - switch (max) { +function Fh(e) { + var t = e.red, n = e.green, r = e.blue, i = e.alpha, a = Math.max(t, n, r), o = Math.min(t, n, r), l = 0, h = 0, c = (o + a) / 2, d = a - o; + if (d > 0) { + switch (h = Math.min(c <= 0.5 ? d / (2 * c) : d / (2 - 2 * c), 1), a) { + case t: + l = (n - r) / d + (n < r ? 6 : 0); + break; + case n: + l = (r - t) / d + 2; + break; case r: - h = (g - b) / chroma + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / chroma + 2; - break; - case b: - h = (r - g) / chroma + 4; + l = (t - n) / d + 4; break; } - h *= 60; - h = Math.round(h); + l *= 60, l = Math.round(l); } - return { h, s, l, a: a2 }; + return { h: l, s: h, l: c, a: i }; } -function getColorValue(node) { - if (node.type === NodeType.HexColorValue) { - var text = node.getText(); - return colorFromHex(text); - } else if (node.type === NodeType.Function) { - var functionNode = node; - var name = functionNode.getName(); - var colorValues = functionNode.getArguments().getChildren(); - if (colorValues.length === 1) { - var functionArg = colorValues[0].getChildren(); - if (functionArg.length === 1 && functionArg[0].type === NodeType.Expression) { - colorValues = functionArg[0].getChildren(); - if (colorValues.length === 3) { - var lastValue = colorValues[2]; - if (lastValue instanceof BinaryExpression) { - var left = lastValue.getLeft(), right = lastValue.getRight(), operator = lastValue.getOperator(); - if (left && right && operator && operator.matches("/")) { - colorValues = [colorValues[0], colorValues[1], left, right]; - } - } +function _h(e) { + if (e.type === m.HexColorValue) { + var t = e.getText(); + return ms(t); + } else if (e.type === m.Function) { + var n = e, r = n.getName(), i = n.getArguments().getChildren(); + if (i.length === 1) { + var a = i[0].getChildren(); + if (a.length === 1 && a[0].type === m.Expression && (i = a[0].getChildren(), i.length === 3)) { + var o = i[2]; + if (o instanceof ai) { + var l = o.getLeft(), h = o.getRight(), c = o.getOperator(); + l && h && c && c.matches("/") && (i = [i[0], i[1], l, h]); } } } - if (!name || colorValues.length < 3 || colorValues.length > 4) { + if (!r || i.length < 3 || i.length > 4) return null; - } try { - var alpha = colorValues.length === 4 ? getNumericValue(colorValues[3], 1) : 1; - if (name === "rgb" || name === "rgba") { + var d = i.length === 4 ? vt(i[3], 1) : 1; + if (r === "rgb" || r === "rgba") return { - red: getNumericValue(colorValues[0], 255), - green: getNumericValue(colorValues[1], 255), - blue: getNumericValue(colorValues[2], 255), - alpha + red: vt(i[0], 255), + green: vt(i[1], 255), + blue: vt(i[2], 255), + alpha: d }; - } else if (name === "hsl" || name === "hsla") { - var h = getAngle(colorValues[0]); - var s = getNumericValue(colorValues[1], 100); - var l = getNumericValue(colorValues[2], 100); - return colorFromHSL(h, s, l, alpha); + if (r === "hsl" || r === "hsla") { + var p = yh(i[0]), f = vt(i[1], 100), g = vt(i[2], 100); + return kh(p, f, g, d); } - } catch (e) { + } catch { return null; } - } else if (node.type === NodeType.Identifier) { - if (node.parent && node.parent.type !== NodeType.Term) { + } else if (e.type === m.Identifier) { + if (e.parent && e.parent.type !== m.Term) return null; - } - var term = node.parent; - if (term && term.parent && term.parent.type === NodeType.BinaryExpression) { - var expression = term.parent; - if (expression.parent && expression.parent.type === NodeType.ListEntry && expression.parent.key === expression) { + var w = e.parent; + if (w && w.parent && w.parent.type === m.BinaryExpression) { + var b = w.parent; + if (b.parent && b.parent.type === m.ListEntry && b.parent.key === b) return null; - } } - var candidateColor = node.getText().toLowerCase(); - if (candidateColor === "none") { + var y = e.getText().toLowerCase(); + if (y === "none") return null; - } - var colorHex = colors[candidateColor]; - if (colorHex) { - return colorFromHex(colorHex); - } + var A = Nn[y]; + if (A) + return ms(A); } return null; } -var positionKeywords = { - "bottom": "Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.", - "center": "Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.", - "left": "Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.", - "right": "Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.", - "top": "Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset." -}; -var repeatStyleKeywords = { +var gs = { + bottom: "Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.", + center: "Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.", + left: "Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.", + right: "Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.", + top: "Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset." +}, bs = { "no-repeat": "Placed once and not repeated in this direction.", - "repeat": "Repeated in this direction as often as needed to cover the background painting area.", + repeat: "Repeated in this direction as often as needed to cover the background painting area.", "repeat-x": "Computes to \u2018repeat no-repeat\u2019.", "repeat-y": "Computes to \u2018no-repeat repeat\u2019.", - "round": "Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.", - "space": "Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area." -}; -var lineStyleKeywords = { - "dashed": "A series of square-ended dashes.", - "dotted": "A series of round dots.", - "double": "Two parallel solid lines with some space between them.", - "groove": "Looks as if it were carved in the canvas.", - "hidden": "Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.", - "inset": "Looks as if the content on the inside of the border is sunken into the canvas.", - "none": "No border. Color and width are ignored.", - "outset": "Looks as if the content on the inside of the border is coming out of the canvas.", - "ridge": "Looks as if it were coming out of the canvas.", - "solid": "A single line segment." -}; -var lineWidthKeywords = ["medium", "thick", "thin"]; -var boxKeywords = { + round: "Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.", + space: "Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area." +}, vs = { + dashed: "A series of square-ended dashes.", + dotted: "A series of round dots.", + double: "Two parallel solid lines with some space between them.", + groove: "Looks as if it were carved in the canvas.", + hidden: "Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.", + inset: "Looks as if the content on the inside of the border is sunken into the canvas.", + none: "No border. Color and width are ignored.", + outset: "Looks as if the content on the inside of the border is coming out of the canvas.", + ridge: "Looks as if it were coming out of the canvas.", + solid: "A single line segment." +}, Dh = ["medium", "thick", "thin"], ys = { "border-box": "The background is painted within (clipped to) the border box.", "content-box": "The background is painted within (clipped to) the content box.", "padding-box": "The background is painted within (clipped to) the padding box." -}; -var geometryBoxKeywords = { +}, ws = { "margin-box": "Uses the margin box as reference box.", "fill-box": "Uses the object bounding box as reference box.", "stroke-box": "Uses the stroke bounding box as reference box.", "view-box": "Uses the nearest SVG viewport as reference box." -}; -var cssWideKeywords = { - "initial": "Represents the value specified as the property\u2019s initial value.", - "inherit": "Represents the computed value of the property on the element\u2019s parent.", - "unset": "Acts as either `inherit` or `initial`, depending on whether the property is inherited or not." -}; -var cssWideFunctions = { +}, xs = { + initial: "Represents the value specified as the property\u2019s initial value.", + inherit: "Represents the computed value of the property on the element\u2019s parent.", + unset: "Acts as either `inherit` or `initial`, depending on whether the property is inherited or not." +}, Ss = { "var()": "Evaluates the value of a custom variable.", "calc()": "Evaluates an mathematical expression. The following operators can be used: + - * /." -}; -var imageFunctions = { +}, Cs = { "url()": "Reference an image file by URL", "image()": "Provide image fallbacks and annotations.", "-webkit-image-set()": "Provide multiple resolutions. Remember to use unprefixed image-set() in addition.", @@ -12080,13 +7724,12 @@ var imageFunctions = { "-webkit-repeating-radial-gradient()": "Repeating radial gradient. Remember to use unprefixed version in addition.", "-moz-repeating-radial-gradient()": "Repeating radial gradient. Remember to use unprefixed version in addition.", "repeating-radial-gradient()": "Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position." -}; -var transitionTimingFunctions = { - "ease": "Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).", +}, ks = { + ease: "Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).", "ease-in": "Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).", "ease-in-out": "Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).", "ease-out": "Equivalent to cubic-bezier(0, 0, 0.58, 1.0).", - "linear": "Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).", + linear: "Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).", "step-end": "Equivalent to steps(1, end).", "step-start": "Equivalent to steps(1, start).", "steps()": "The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value \u201Cstart\u201D or \u201Cend\u201D.", @@ -12115,22 +7758,19 @@ var transitionTimingFunctions = { "cubic-bezier(0.755, 0.05, 0.855, 0.06)": "Ease-in Quintic. Based on power of five.", "cubic-bezier(0.86, 0, 0.07, 1)": "Ease-in-out Quintic. Based on power of five.", "cubic-bezier(0.23, 1, 0.320, 1)": "Ease-out Quintic. Based on power of five." -}; -var basicShapeFunctions = { +}, Fs = { "circle()": "Defines a circle.", "ellipse()": "Defines an ellipse.", "inset()": "Defines an inset rectangle.", "polygon()": "Defines a polygon." -}; -var units = { - "length": ["em", "rem", "ex", "px", "cm", "mm", "in", "pt", "pc", "ch", "vw", "vh", "vmin", "vmax"], - "angle": ["deg", "rad", "grad", "turn"], - "time": ["ms", "s"], - "frequency": ["Hz", "kHz"], - "resolution": ["dpi", "dpcm", "dppx"], - "percentage": ["%", "fr"] -}; -var html5Tags = [ +}, xo = { + length: ["em", "rem", "ex", "px", "cm", "mm", "in", "pt", "pc", "ch", "vw", "vh", "vmin", "vmax"], + angle: ["deg", "rad", "grad", "turn"], + time: ["ms", "s"], + frequency: ["Hz", "kHz"], + resolution: ["dpi", "dpcm", "dppx"], + percentage: ["%", "fr"] +}, Eh = [ "a", "abbr", "address", @@ -12246,8 +7886,7 @@ var html5Tags = [ "const", "video", "wbr" -]; -var svgElements = [ +], Rh = [ "circle", "clipPath", "cursor", @@ -12311,8 +7950,7 @@ var svgElements = [ "tspan", "use", "view" -]; -var pageBoxDirectives = [ +], Ah = [ "@bottom-center", "@bottom-left", "@bottom-left-corner", @@ -12330,8136 +7968,5301 @@ var pageBoxDirectives = [ "@top-right", "@top-right-corner" ]; -function values(obj) { - return Object.keys(obj).map(function(key) { - return obj[key]; +function un(e) { + return Object.keys(e).map(function(t) { + return e[t]; }); } -function isDefined(obj) { - return typeof obj !== "undefined"; +function Ee(e) { + return typeof e < "u"; } -var __spreadArray = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var Parser = function() { - function Parser2(scnr) { - if (scnr === void 0) { - scnr = new Scanner(); - } - this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i; - this.scanner = scnr; - this.token = { type: TokenType.EOF, offset: -1, len: 0, text: "" }; - this.prevToken = void 0; +var _s = function(e, t, n) { + if (n || arguments.length === 2) + for (var r = 0, i = t.length, a; r < i; r++) + (a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]); + return e.concat(a || Array.prototype.slice.call(t)); +}, ci = function() { + function e(t) { + t === void 0 && (t = new en()), this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i, this.scanner = t, this.token = { type: u.EOF, offset: -1, len: 0, text: "" }, this.prevToken = void 0; } - Parser2.prototype.peekIdent = function(text) { - return TokenType.Ident === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase(); - }; - Parser2.prototype.peekKeyword = function(text) { - return TokenType.AtKeyword === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase(); - }; - Parser2.prototype.peekDelim = function(text) { - return TokenType.Delim === this.token.type && text === this.token.text; - }; - Parser2.prototype.peek = function(type) { - return type === this.token.type; - }; - Parser2.prototype.peekOne = function() { - var types = []; - for (var _i = 0; _i < arguments.length; _i++) { - types[_i] = arguments[_i]; - } - return types.indexOf(this.token.type) !== -1; - }; - Parser2.prototype.peekRegExp = function(type, regEx) { - if (type !== this.token.type) { - return false; - } - return regEx.test(this.token.text); - }; - Parser2.prototype.hasWhitespace = function() { + return e.prototype.peekIdent = function(t) { + return u.Ident === this.token.type && t.length === this.token.text.length && t === this.token.text.toLowerCase(); + }, e.prototype.peekKeyword = function(t) { + return u.AtKeyword === this.token.type && t.length === this.token.text.length && t === this.token.text.toLowerCase(); + }, e.prototype.peekDelim = function(t) { + return u.Delim === this.token.type && t === this.token.text; + }, e.prototype.peek = function(t) { + return t === this.token.type; + }, e.prototype.peekOne = function() { + for (var t = [], n = 0; n < arguments.length; n++) + t[n] = arguments[n]; + return t.indexOf(this.token.type) !== -1; + }, e.prototype.peekRegExp = function(t, n) { + return t !== this.token.type ? !1 : n.test(this.token.text); + }, e.prototype.hasWhitespace = function() { return !!this.prevToken && this.prevToken.offset + this.prevToken.len !== this.token.offset; - }; - Parser2.prototype.consumeToken = function() { - this.prevToken = this.token; - this.token = this.scanner.scan(); - }; - Parser2.prototype.mark = function() { + }, e.prototype.consumeToken = function() { + this.prevToken = this.token, this.token = this.scanner.scan(); + }, e.prototype.mark = function() { return { prev: this.prevToken, curr: this.token, pos: this.scanner.pos() }; - }; - Parser2.prototype.restoreAtMark = function(mark) { - this.prevToken = mark.prev; - this.token = mark.curr; - this.scanner.goBackTo(mark.pos); - }; - Parser2.prototype.try = function(func) { - var pos = this.mark(); - var node = func(); - if (!node) { - this.restoreAtMark(pos); - return null; - } - return node; - }; - Parser2.prototype.acceptOneKeyword = function(keywords) { - if (TokenType.AtKeyword === this.token.type) { - for (var _i = 0, keywords_1 = keywords; _i < keywords_1.length; _i++) { - var keyword = keywords_1[_i]; - if (keyword.length === this.token.text.length && keyword === this.token.text.toLowerCase()) { - this.consumeToken(); - return true; - } + }, e.prototype.restoreAtMark = function(t) { + this.prevToken = t.prev, this.token = t.curr, this.scanner.goBackTo(t.pos); + }, e.prototype.try = function(t) { + var n = this.mark(), r = t(); + return r || (this.restoreAtMark(n), null); + }, e.prototype.acceptOneKeyword = function(t) { + if (u.AtKeyword === this.token.type) + for (var n = 0, r = t; n < r.length; n++) { + var i = r[n]; + if (i.length === this.token.text.length && i === this.token.text.toLowerCase()) + return this.consumeToken(), !0; } - } - return false; - }; - Parser2.prototype.accept = function(type) { - if (type === this.token.type) { - this.consumeToken(); - return true; - } - return false; - }; - Parser2.prototype.acceptIdent = function(text) { - if (this.peekIdent(text)) { - this.consumeToken(); - return true; - } - return false; - }; - Parser2.prototype.acceptKeyword = function(text) { - if (this.peekKeyword(text)) { - this.consumeToken(); - return true; - } - return false; - }; - Parser2.prototype.acceptDelim = function(text) { - if (this.peekDelim(text)) { - this.consumeToken(); - return true; - } - return false; - }; - Parser2.prototype.acceptRegexp = function(regEx) { - if (regEx.test(this.token.text)) { - this.consumeToken(); - return true; - } - return false; - }; - Parser2.prototype._parseRegexp = function(regEx) { - var node = this.createNode(NodeType.Identifier); - do { - } while (this.acceptRegexp(regEx)); - return this.finish(node); - }; - Parser2.prototype.acceptUnquotedString = function() { - var pos = this.scanner.pos(); - this.scanner.goBackTo(this.token.offset); - var unquoted = this.scanner.scanUnquotedString(); - if (unquoted) { - this.token = unquoted; - this.consumeToken(); - return true; - } - this.scanner.goBackTo(pos); - return false; - }; - Parser2.prototype.resync = function(resyncTokens, resyncStopTokens) { - while (true) { - if (resyncTokens && resyncTokens.indexOf(this.token.type) !== -1) { - this.consumeToken(); - return true; - } else if (resyncStopTokens && resyncStopTokens.indexOf(this.token.type) !== -1) { - return true; - } else { - if (this.token.type === TokenType.EOF) { - return false; - } - this.token = this.scanner.scan(); - } - } - }; - Parser2.prototype.createNode = function(nodeType) { - return new Node(this.token.offset, this.token.len, nodeType); - }; - Parser2.prototype.create = function(ctor) { - return new ctor(this.token.offset, this.token.len); - }; - Parser2.prototype.finish = function(node, error, resyncTokens, resyncStopTokens) { - if (!(node instanceof Nodelist)) { - if (error) { - this.markError(node, error, resyncTokens, resyncStopTokens); - } - if (this.prevToken) { - var prevEnd = this.prevToken.offset + this.prevToken.len; - node.length = prevEnd > node.offset ? prevEnd - node.offset : 0; - } - } - return node; - }; - Parser2.prototype.markError = function(node, error, resyncTokens, resyncStopTokens) { - if (this.token !== this.lastErrorToken) { - node.addIssue(new Marker(node, error, Level.Error, void 0, this.token.offset, this.token.len)); - this.lastErrorToken = this.token; - } - if (resyncTokens || resyncStopTokens) { - this.resync(resyncTokens, resyncStopTokens); - } - }; - Parser2.prototype.parseStylesheet = function(textDocument) { - var versionId = textDocument.version; - var text = textDocument.getText(); - var textProvider = function(offset, length) { - if (textDocument.version !== versionId) { - throw new Error("Underlying model has changed, AST is no longer valid"); - } - return text.substr(offset, length); - }; - return this.internalParse(text, this._parseStylesheet, textProvider); - }; - Parser2.prototype.internalParse = function(input, parseFunc, textProvider) { - this.scanner.setSource(input); - this.token = this.scanner.scan(); - var node = parseFunc.bind(this)(); - if (node) { - if (textProvider) { - node.textProvider = textProvider; - } else { - node.textProvider = function(offset, length) { - return input.substr(offset, length); - }; - } - } - return node; - }; - Parser2.prototype._parseStylesheet = function() { - var node = this.create(Stylesheet); - while (node.addChild(this._parseStylesheetStart())) { - } - var inRecovery = false; - do { - var hasMatch = false; - do { - hasMatch = false; - var statement = this._parseStylesheetStatement(); - if (statement) { - node.addChild(statement); - hasMatch = true; - inRecovery = false; - if (!this.peek(TokenType.EOF) && this._needsSemicolonAfter(statement) && !this.accept(TokenType.SemiColon)) { - this.markError(node, ParseError.SemiColonExpected); - } - } - while (this.accept(TokenType.SemiColon) || this.accept(TokenType.CDO) || this.accept(TokenType.CDC)) { - hasMatch = true; - inRecovery = false; - } - } while (hasMatch); - if (this.peek(TokenType.EOF)) { - break; - } - if (!inRecovery) { - if (this.peek(TokenType.AtKeyword)) { - this.markError(node, ParseError.UnknownAtRule); - } else { - this.markError(node, ParseError.RuleOrSelectorExpected); - } - inRecovery = true; - } - this.consumeToken(); - } while (!this.peek(TokenType.EOF)); - return this.finish(node); - }; - Parser2.prototype._parseStylesheetStart = function() { - return this._parseCharset(); - }; - Parser2.prototype._parseStylesheetStatement = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - if (this.peek(TokenType.AtKeyword)) { - return this._parseStylesheetAtStatement(isNested); - } - return this._parseRuleset(isNested); - }; - Parser2.prototype._parseStylesheetAtStatement = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - return this._parseImport() || this._parseMedia(isNested) || this._parsePage() || this._parseFontFace() || this._parseKeyframe() || this._parseSupports(isNested) || this._parseViewPort() || this._parseNamespace() || this._parseDocument() || this._parseUnknownAtRule(); - }; - Parser2.prototype._tryParseRuleset = function(isNested) { - var mark = this.mark(); - if (this._parseSelector(isNested)) { - while (this.accept(TokenType.Comma) && this._parseSelector(isNested)) { - } - if (this.accept(TokenType.CurlyL)) { - this.restoreAtMark(mark); - return this._parseRuleset(isNested); - } - } - this.restoreAtMark(mark); - return null; - }; - Parser2.prototype._parseRuleset = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - var node = this.create(RuleSet); - var selectors = node.getSelectors(); - if (!selectors.addChild(this._parseSelector(isNested))) { - return null; - } - while (this.accept(TokenType.Comma)) { - if (!selectors.addChild(this._parseSelector(isNested))) { - return this.finish(node, ParseError.SelectorExpected); - } - } - return this._parseBody(node, this._parseRuleSetDeclaration.bind(this)); - }; - Parser2.prototype._parseRuleSetDeclarationAtStatement = function() { - return this._parseUnknownAtRule(); - }; - Parser2.prototype._parseRuleSetDeclaration = function() { - if (this.peek(TokenType.AtKeyword)) { - return this._parseRuleSetDeclarationAtStatement(); - } - return this._parseDeclaration(); - }; - Parser2.prototype._needsSemicolonAfter = function(node) { - switch (node.type) { - case NodeType.Keyframe: - case NodeType.ViewPort: - case NodeType.Media: - case NodeType.Ruleset: - case NodeType.Namespace: - case NodeType.If: - case NodeType.For: - case NodeType.Each: - case NodeType.While: - case NodeType.MixinDeclaration: - case NodeType.FunctionDeclaration: - case NodeType.MixinContentDeclaration: - return false; - case NodeType.ExtendsReference: - case NodeType.MixinContentReference: - case NodeType.ReturnStatement: - case NodeType.MediaQuery: - case NodeType.Debug: - case NodeType.Import: - case NodeType.AtApplyRule: - case NodeType.CustomPropertyDeclaration: - return true; - case NodeType.VariableDeclaration: - return node.needsSemicolon; - case NodeType.MixinReference: - return !node.getContent(); - case NodeType.Declaration: - return !node.getNestedProperties(); - } - return false; - }; - Parser2.prototype._parseDeclarations = function(parseDeclaration) { - var node = this.create(Declarations); - if (!this.accept(TokenType.CurlyL)) { - return null; - } - var decl = parseDeclaration(); - while (node.addChild(decl)) { - if (this.peek(TokenType.CurlyR)) { - break; - } - if (this._needsSemicolonAfter(decl) && !this.accept(TokenType.SemiColon)) { - return this.finish(node, ParseError.SemiColonExpected, [TokenType.SemiColon, TokenType.CurlyR]); - } - if (decl && this.prevToken && this.prevToken.type === TokenType.SemiColon) { - decl.semicolonPosition = this.prevToken.offset; - } - while (this.accept(TokenType.SemiColon)) { - } - decl = parseDeclaration(); - } - if (!this.accept(TokenType.CurlyR)) { - return this.finish(node, ParseError.RightCurlyExpected, [TokenType.CurlyR, TokenType.SemiColon]); - } - return this.finish(node); - }; - Parser2.prototype._parseBody = function(node, parseDeclaration) { - if (!node.setDeclarations(this._parseDeclarations(parseDeclaration))) { - return this.finish(node, ParseError.LeftCurlyExpected, [TokenType.CurlyR, TokenType.SemiColon]); - } - return this.finish(node); - }; - Parser2.prototype._parseSelector = function(isNested) { - var node = this.create(Selector); - var hasContent = false; - if (isNested) { - hasContent = node.addChild(this._parseCombinator()); - } - while (node.addChild(this._parseSimpleSelector())) { - hasContent = true; - node.addChild(this._parseCombinator()); - } - return hasContent ? this.finish(node) : null; - }; - Parser2.prototype._parseDeclaration = function(stopTokens) { - var custonProperty = this._tryParseCustomPropertyDeclaration(stopTokens); - if (custonProperty) { - return custonProperty; - } - var node = this.create(Declaration); - if (!node.setProperty(this._parseProperty())) { - return null; - } - if (!this.accept(TokenType.Colon)) { - return this.finish(node, ParseError.ColonExpected, [TokenType.Colon], stopTokens || [TokenType.SemiColon]); - } - if (this.prevToken) { - node.colonPosition = this.prevToken.offset; - } - if (!node.setValue(this._parseExpr())) { - return this.finish(node, ParseError.PropertyValueExpected); - } - node.addChild(this._parsePrio()); - if (this.peek(TokenType.SemiColon)) { - node.semicolonPosition = this.token.offset; - } - return this.finish(node); - }; - Parser2.prototype._tryParseCustomPropertyDeclaration = function(stopTokens) { - if (!this.peekRegExp(TokenType.Ident, /^--/)) { - return null; - } - var node = this.create(CustomPropertyDeclaration); - if (!node.setProperty(this._parseProperty())) { - return null; - } - if (!this.accept(TokenType.Colon)) { - return this.finish(node, ParseError.ColonExpected, [TokenType.Colon]); - } - if (this.prevToken) { - node.colonPosition = this.prevToken.offset; - } - var mark = this.mark(); - if (this.peek(TokenType.CurlyL)) { - var propertySet = this.create(CustomPropertySet); - var declarations = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this)); - if (propertySet.setDeclarations(declarations) && !declarations.isErroneous(true)) { - propertySet.addChild(this._parsePrio()); - if (this.peek(TokenType.SemiColon)) { - this.finish(propertySet); - node.setPropertySet(propertySet); - node.semicolonPosition = this.token.offset; - return this.finish(node); - } - } - this.restoreAtMark(mark); - } - var expression = this._parseExpr(); - if (expression && !expression.isErroneous(true)) { - this._parsePrio(); - if (this.peekOne.apply(this, __spreadArray(__spreadArray([], stopTokens || [], false), [TokenType.SemiColon, TokenType.EOF], false))) { - node.setValue(expression); - if (this.peek(TokenType.SemiColon)) { - node.semicolonPosition = this.token.offset; - } - return this.finish(node); - } - } - this.restoreAtMark(mark); - node.addChild(this._parseCustomPropertyValue(stopTokens)); - node.addChild(this._parsePrio()); - if (isDefined(node.colonPosition) && this.token.offset === node.colonPosition + 1) { - return this.finish(node, ParseError.PropertyValueExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseCustomPropertyValue = function(stopTokens) { - var _this = this; - if (stopTokens === void 0) { - stopTokens = [TokenType.CurlyR]; - } - var node = this.create(Node); - var isTopLevel = function() { - return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; - }; - var onStopToken = function() { - return stopTokens.indexOf(_this.token.type) !== -1; - }; - var curlyDepth = 0; - var parensDepth = 0; - var bracketsDepth = 0; - done: - while (true) { - switch (this.token.type) { - case TokenType.SemiColon: - if (isTopLevel()) { - break done; - } - break; - case TokenType.Exclamation: - if (isTopLevel()) { - break done; - } - break; - case TokenType.CurlyL: - curlyDepth++; - break; - case TokenType.CurlyR: - curlyDepth--; - if (curlyDepth < 0) { - if (onStopToken() && parensDepth === 0 && bracketsDepth === 0) { - break done; - } - return this.finish(node, ParseError.LeftCurlyExpected); - } - break; - case TokenType.ParenthesisL: - parensDepth++; - break; - case TokenType.ParenthesisR: - parensDepth--; - if (parensDepth < 0) { - if (onStopToken() && bracketsDepth === 0 && curlyDepth === 0) { - break done; - } - return this.finish(node, ParseError.LeftParenthesisExpected); - } - break; - case TokenType.BracketL: - bracketsDepth++; - break; - case TokenType.BracketR: - bracketsDepth--; - if (bracketsDepth < 0) { - return this.finish(node, ParseError.LeftSquareBracketExpected); - } - break; - case TokenType.BadString: - break done; - case TokenType.EOF: - var error = ParseError.RightCurlyExpected; - if (bracketsDepth > 0) { - error = ParseError.RightSquareBracketExpected; - } else if (parensDepth > 0) { - error = ParseError.RightParenthesisExpected; - } - return this.finish(node, error); - } - this.consumeToken(); - } - return this.finish(node); - }; - Parser2.prototype._tryToParseDeclaration = function(stopTokens) { - var mark = this.mark(); - if (this._parseProperty() && this.accept(TokenType.Colon)) { - this.restoreAtMark(mark); - return this._parseDeclaration(stopTokens); - } - this.restoreAtMark(mark); - return null; - }; - Parser2.prototype._parseProperty = function() { - var node = this.create(Property); - var mark = this.mark(); - if (this.acceptDelim("*") || this.acceptDelim("_")) { - if (this.hasWhitespace()) { - this.restoreAtMark(mark); - return null; - } - } - if (node.setIdentifier(this._parsePropertyIdentifier())) { - return this.finish(node); - } - return null; - }; - Parser2.prototype._parsePropertyIdentifier = function() { - return this._parseIdent(); - }; - Parser2.prototype._parseCharset = function() { - if (!this.peek(TokenType.Charset)) { - return null; - } - var node = this.create(Node); - this.consumeToken(); - if (!this.accept(TokenType.String)) { - return this.finish(node, ParseError.IdentifierExpected); - } - if (!this.accept(TokenType.SemiColon)) { - return this.finish(node, ParseError.SemiColonExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseImport = function() { - if (!this.peekKeyword("@import")) { - return null; - } - var node = this.create(Import); - this.consumeToken(); - if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.URIOrStringExpected); - } - if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) { - node.setMedialist(this._parseMediaQueryList()); - } - return this.finish(node); - }; - Parser2.prototype._parseNamespace = function() { - if (!this.peekKeyword("@namespace")) { - return null; - } - var node = this.create(Namespace); - this.consumeToken(); - if (!node.addChild(this._parseURILiteral())) { - node.addChild(this._parseIdent()); - if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.URIExpected, [TokenType.SemiColon]); - } - } - if (!this.accept(TokenType.SemiColon)) { - return this.finish(node, ParseError.SemiColonExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseFontFace = function() { - if (!this.peekKeyword("@font-face")) { - return null; - } - var node = this.create(FontFace); - this.consumeToken(); - return this._parseBody(node, this._parseRuleSetDeclaration.bind(this)); - }; - Parser2.prototype._parseViewPort = function() { - if (!this.peekKeyword("@-ms-viewport") && !this.peekKeyword("@-o-viewport") && !this.peekKeyword("@viewport")) { - return null; - } - var node = this.create(ViewPort); - this.consumeToken(); - return this._parseBody(node, this._parseRuleSetDeclaration.bind(this)); - }; - Parser2.prototype._parseKeyframe = function() { - if (!this.peekRegExp(TokenType.AtKeyword, this.keyframeRegex)) { - return null; - } - var node = this.create(Keyframe); - var atNode = this.create(Node); - this.consumeToken(); - node.setKeyword(this.finish(atNode)); - if (atNode.matches("@-ms-keyframes")) { - this.markError(atNode, ParseError.UnknownKeyword); - } - if (!node.setIdentifier(this._parseKeyframeIdent())) { - return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]); - } - return this._parseBody(node, this._parseKeyframeSelector.bind(this)); - }; - Parser2.prototype._parseKeyframeIdent = function() { - return this._parseIdent([ReferenceType.Keyframe]); - }; - Parser2.prototype._parseKeyframeSelector = function() { - var node = this.create(KeyframeSelector); - if (!node.addChild(this._parseIdent()) && !this.accept(TokenType.Percentage)) { - return null; - } - while (this.accept(TokenType.Comma)) { - if (!node.addChild(this._parseIdent()) && !this.accept(TokenType.Percentage)) { - return this.finish(node, ParseError.PercentageExpected); - } - } - return this._parseBody(node, this._parseRuleSetDeclaration.bind(this)); - }; - Parser2.prototype._tryParseKeyframeSelector = function() { - var node = this.create(KeyframeSelector); - var pos = this.mark(); - if (!node.addChild(this._parseIdent()) && !this.accept(TokenType.Percentage)) { - return null; - } - while (this.accept(TokenType.Comma)) { - if (!node.addChild(this._parseIdent()) && !this.accept(TokenType.Percentage)) { - this.restoreAtMark(pos); - return null; - } - } - if (!this.peek(TokenType.CurlyL)) { - this.restoreAtMark(pos); - return null; - } - return this._parseBody(node, this._parseRuleSetDeclaration.bind(this)); - }; - Parser2.prototype._parseSupports = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - if (!this.peekKeyword("@supports")) { - return null; - } - var node = this.create(Supports); - this.consumeToken(); - node.addChild(this._parseSupportsCondition()); - return this._parseBody(node, this._parseSupportsDeclaration.bind(this, isNested)); - }; - Parser2.prototype._parseSupportsDeclaration = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - if (isNested) { - return this._tryParseRuleset(true) || this._tryToParseDeclaration() || this._parseStylesheetStatement(true); - } - return this._parseStylesheetStatement(false); - }; - Parser2.prototype._parseSupportsCondition = function() { - var node = this.create(SupportsCondition); - if (this.acceptIdent("not")) { - node.addChild(this._parseSupportsConditionInParens()); - } else { - node.addChild(this._parseSupportsConditionInParens()); - if (this.peekRegExp(TokenType.Ident, /^(and|or)$/i)) { - var text = this.token.text.toLowerCase(); - while (this.acceptIdent(text)) { - node.addChild(this._parseSupportsConditionInParens()); - } - } - } - return this.finish(node); - }; - Parser2.prototype._parseSupportsConditionInParens = function() { - var node = this.create(SupportsCondition); - if (this.accept(TokenType.ParenthesisL)) { - if (this.prevToken) { - node.lParent = this.prevToken.offset; - } - if (!node.addChild(this._tryToParseDeclaration([TokenType.ParenthesisR]))) { - if (!this._parseSupportsCondition()) { - return this.finish(node, ParseError.ConditionExpected); - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.ParenthesisR], []); - } - if (this.prevToken) { - node.rParent = this.prevToken.offset; - } - return this.finish(node); - } else if (this.peek(TokenType.Ident)) { - var pos = this.mark(); - this.consumeToken(); - if (!this.hasWhitespace() && this.accept(TokenType.ParenthesisL)) { - var openParentCount = 1; - while (this.token.type !== TokenType.EOF && openParentCount !== 0) { - if (this.token.type === TokenType.ParenthesisL) { - openParentCount++; - } else if (this.token.type === TokenType.ParenthesisR) { - openParentCount--; - } - this.consumeToken(); - } - return this.finish(node); - } else { - this.restoreAtMark(pos); - } - } - return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.ParenthesisL]); - }; - Parser2.prototype._parseMediaDeclaration = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - if (isNested) { - return this._tryParseRuleset(true) || this._tryToParseDeclaration() || this._parseStylesheetStatement(true); - } - return this._parseStylesheetStatement(false); - }; - Parser2.prototype._parseMedia = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - if (!this.peekKeyword("@media")) { - return null; - } - var node = this.create(Media); - this.consumeToken(); - if (!node.addChild(this._parseMediaQueryList())) { - return this.finish(node, ParseError.MediaQueryExpected); - } - return this._parseBody(node, this._parseMediaDeclaration.bind(this, isNested)); - }; - Parser2.prototype._parseMediaQueryList = function() { - var node = this.create(Medialist); - if (!node.addChild(this._parseMediaQuery())) { - return this.finish(node, ParseError.MediaQueryExpected); - } - while (this.accept(TokenType.Comma)) { - if (!node.addChild(this._parseMediaQuery())) { - return this.finish(node, ParseError.MediaQueryExpected); - } - } - return this.finish(node); - }; - Parser2.prototype._parseMediaQuery = function() { - var node = this.create(MediaQuery); - var pos = this.mark(); - this.acceptIdent("not"); - if (!this.peek(TokenType.ParenthesisL)) { - if (this.acceptIdent("only")) - ; - if (!node.addChild(this._parseIdent())) { - return null; - } - if (this.acceptIdent("and")) { - node.addChild(this._parseMediaCondition()); - } - } else { - this.restoreAtMark(pos); - node.addChild(this._parseMediaCondition()); - } - return this.finish(node); - }; - Parser2.prototype._parseRatio = function() { - var pos = this.mark(); - var node = this.create(RatioValue); - if (!this._parseNumeric()) { - return null; - } - if (!this.acceptDelim("/")) { - this.restoreAtMark(pos); - return null; - } - if (!this._parseNumeric()) { - return this.finish(node, ParseError.NumberExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseMediaCondition = function() { - var node = this.create(MediaCondition); - this.acceptIdent("not"); - var parseExpression = true; - while (parseExpression) { - if (!this.accept(TokenType.ParenthesisL)) { - return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.CurlyL]); - } - if (this.peek(TokenType.ParenthesisL) || this.peekIdent("not")) { - node.addChild(this._parseMediaCondition()); - } else { - node.addChild(this._parseMediaFeature()); - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]); - } - parseExpression = this.acceptIdent("and") || this.acceptIdent("or"); - } - return this.finish(node); - }; - Parser2.prototype._parseMediaFeature = function() { - var _this = this; - var resyncStopToken = [TokenType.ParenthesisR]; - var node = this.create(MediaFeature); - var parseRangeOperator = function() { - if (_this.acceptDelim("<") || _this.acceptDelim(">")) { - if (!_this.hasWhitespace()) { - _this.acceptDelim("="); - } - return true; - } else if (_this.acceptDelim("=")) { - return true; - } - return false; - }; - if (node.addChild(this._parseMediaFeatureName())) { - if (this.accept(TokenType.Colon)) { - if (!node.addChild(this._parseMediaFeatureValue())) { - return this.finish(node, ParseError.TermExpected, [], resyncStopToken); - } - } else if (parseRangeOperator()) { - if (!node.addChild(this._parseMediaFeatureValue())) { - return this.finish(node, ParseError.TermExpected, [], resyncStopToken); - } - if (parseRangeOperator()) { - if (!node.addChild(this._parseMediaFeatureValue())) { - return this.finish(node, ParseError.TermExpected, [], resyncStopToken); - } - } - } else - ; - } else if (node.addChild(this._parseMediaFeatureValue())) { - if (!parseRangeOperator()) { - return this.finish(node, ParseError.OperatorExpected, [], resyncStopToken); - } - if (!node.addChild(this._parseMediaFeatureName())) { - return this.finish(node, ParseError.IdentifierExpected, [], resyncStopToken); - } - if (parseRangeOperator()) { - if (!node.addChild(this._parseMediaFeatureValue())) { - return this.finish(node, ParseError.TermExpected, [], resyncStopToken); - } - } - } else { - return this.finish(node, ParseError.IdentifierExpected, [], resyncStopToken); - } - return this.finish(node); - }; - Parser2.prototype._parseMediaFeatureName = function() { - return this._parseIdent(); - }; - Parser2.prototype._parseMediaFeatureValue = function() { - return this._parseRatio() || this._parseTermExpression(); - }; - Parser2.prototype._parseMedium = function() { - var node = this.create(Node); - if (node.addChild(this._parseIdent())) { - return this.finish(node); - } else { - return null; - } - }; - Parser2.prototype._parsePageDeclaration = function() { - return this._parsePageMarginBox() || this._parseRuleSetDeclaration(); - }; - Parser2.prototype._parsePage = function() { - if (!this.peekKeyword("@page")) { - return null; - } - var node = this.create(Page); - this.consumeToken(); - if (node.addChild(this._parsePageSelector())) { - while (this.accept(TokenType.Comma)) { - if (!node.addChild(this._parsePageSelector())) { - return this.finish(node, ParseError.IdentifierExpected); - } - } - } - return this._parseBody(node, this._parsePageDeclaration.bind(this)); - }; - Parser2.prototype._parsePageMarginBox = function() { - if (!this.peek(TokenType.AtKeyword)) { - return null; - } - var node = this.create(PageBoxMarginBox); - if (!this.acceptOneKeyword(pageBoxDirectives)) { - this.markError(node, ParseError.UnknownAtRule, [], [TokenType.CurlyL]); - } - return this._parseBody(node, this._parseRuleSetDeclaration.bind(this)); - }; - Parser2.prototype._parsePageSelector = function() { - if (!this.peek(TokenType.Ident) && !this.peek(TokenType.Colon)) { - return null; - } - var node = this.create(Node); - node.addChild(this._parseIdent()); - if (this.accept(TokenType.Colon)) { - if (!node.addChild(this._parseIdent())) { - return this.finish(node, ParseError.IdentifierExpected); - } - } - return this.finish(node); - }; - Parser2.prototype._parseDocument = function() { - if (!this.peekKeyword("@-moz-document")) { - return null; - } - var node = this.create(Document); - this.consumeToken(); - this.resync([], [TokenType.CurlyL]); - return this._parseBody(node, this._parseStylesheetStatement.bind(this)); - }; - Parser2.prototype._parseUnknownAtRule = function() { - if (!this.peek(TokenType.AtKeyword)) { - return null; - } - var node = this.create(UnknownAtRule); - node.addChild(this._parseUnknownAtRuleName()); - var isTopLevel = function() { - return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; - }; - var curlyLCount = 0; - var curlyDepth = 0; - var parensDepth = 0; - var bracketsDepth = 0; - done: - while (true) { - switch (this.token.type) { - case TokenType.SemiColon: - if (isTopLevel()) { - break done; - } - break; - case TokenType.EOF: - if (curlyDepth > 0) { - return this.finish(node, ParseError.RightCurlyExpected); - } else if (bracketsDepth > 0) { - return this.finish(node, ParseError.RightSquareBracketExpected); - } else if (parensDepth > 0) { - return this.finish(node, ParseError.RightParenthesisExpected); - } else { - return this.finish(node); - } - case TokenType.CurlyL: - curlyLCount++; - curlyDepth++; - break; - case TokenType.CurlyR: - curlyDepth--; - if (curlyLCount > 0 && curlyDepth === 0) { - this.consumeToken(); - if (bracketsDepth > 0) { - return this.finish(node, ParseError.RightSquareBracketExpected); - } else if (parensDepth > 0) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - break done; - } - if (curlyDepth < 0) { - if (parensDepth === 0 && bracketsDepth === 0) { - break done; - } - return this.finish(node, ParseError.LeftCurlyExpected); - } - break; - case TokenType.ParenthesisL: - parensDepth++; - break; - case TokenType.ParenthesisR: - parensDepth--; - if (parensDepth < 0) { - return this.finish(node, ParseError.LeftParenthesisExpected); - } - break; - case TokenType.BracketL: - bracketsDepth++; - break; - case TokenType.BracketR: - bracketsDepth--; - if (bracketsDepth < 0) { - return this.finish(node, ParseError.LeftSquareBracketExpected); - } - break; - } - this.consumeToken(); - } - return node; - }; - Parser2.prototype._parseUnknownAtRuleName = function() { - var node = this.create(Node); - if (this.accept(TokenType.AtKeyword)) { - return this.finish(node); - } - return node; - }; - Parser2.prototype._parseOperator = function() { - if (this.peekDelim("/") || this.peekDelim("*") || this.peekDelim("+") || this.peekDelim("-") || this.peek(TokenType.Dashmatch) || this.peek(TokenType.Includes) || this.peek(TokenType.SubstringOperator) || this.peek(TokenType.PrefixOperator) || this.peek(TokenType.SuffixOperator) || this.peekDelim("=")) { - var node = this.createNode(NodeType.Operator); - this.consumeToken(); - return this.finish(node); - } else { - return null; - } - }; - Parser2.prototype._parseUnaryOperator = function() { - if (!this.peekDelim("+") && !this.peekDelim("-")) { - return null; - } - var node = this.create(Node); - this.consumeToken(); - return this.finish(node); - }; - Parser2.prototype._parseCombinator = function() { - if (this.peekDelim(">")) { - var node = this.create(Node); - this.consumeToken(); - var mark = this.mark(); - if (!this.hasWhitespace() && this.acceptDelim(">")) { - if (!this.hasWhitespace() && this.acceptDelim(">")) { - node.type = NodeType.SelectorCombinatorShadowPiercingDescendant; - return this.finish(node); - } - this.restoreAtMark(mark); - } - node.type = NodeType.SelectorCombinatorParent; - return this.finish(node); - } else if (this.peekDelim("+")) { - var node = this.create(Node); - this.consumeToken(); - node.type = NodeType.SelectorCombinatorSibling; - return this.finish(node); - } else if (this.peekDelim("~")) { - var node = this.create(Node); - this.consumeToken(); - node.type = NodeType.SelectorCombinatorAllSiblings; - return this.finish(node); - } else if (this.peekDelim("/")) { - var node = this.create(Node); - this.consumeToken(); - var mark = this.mark(); - if (!this.hasWhitespace() && this.acceptIdent("deep") && !this.hasWhitespace() && this.acceptDelim("/")) { - node.type = NodeType.SelectorCombinatorShadowPiercingDescendant; - return this.finish(node); - } - this.restoreAtMark(mark); - } - return null; - }; - Parser2.prototype._parseSimpleSelector = function() { - var node = this.create(SimpleSelector); - var c = 0; - if (node.addChild(this._parseElementName())) { - c++; - } - while ((c === 0 || !this.hasWhitespace()) && node.addChild(this._parseSimpleSelectorBody())) { - c++; - } - return c > 0 ? this.finish(node) : null; - }; - Parser2.prototype._parseSimpleSelectorBody = function() { - return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib(); - }; - Parser2.prototype._parseSelectorIdent = function() { - return this._parseIdent(); - }; - Parser2.prototype._parseHash = function() { - if (!this.peek(TokenType.Hash) && !this.peekDelim("#")) { - return null; - } - var node = this.createNode(NodeType.IdentifierSelector); - if (this.acceptDelim("#")) { - if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) { - return this.finish(node, ParseError.IdentifierExpected); - } - } else { - this.consumeToken(); - } - return this.finish(node); - }; - Parser2.prototype._parseClass = function() { - if (!this.peekDelim(".")) { - return null; - } - var node = this.createNode(NodeType.ClassSelector); - this.consumeToken(); - if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) { - return this.finish(node, ParseError.IdentifierExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseElementName = function() { - var pos = this.mark(); - var node = this.createNode(NodeType.ElementNameSelector); - node.addChild(this._parseNamespacePrefix()); - if (!node.addChild(this._parseSelectorIdent()) && !this.acceptDelim("*")) { - this.restoreAtMark(pos); - return null; - } - return this.finish(node); - }; - Parser2.prototype._parseNamespacePrefix = function() { - var pos = this.mark(); - var node = this.createNode(NodeType.NamespacePrefix); - if (!node.addChild(this._parseIdent()) && !this.acceptDelim("*")) + return !1; + }, e.prototype.accept = function(t) { + return t === this.token.type ? (this.consumeToken(), !0) : !1; + }, e.prototype.acceptIdent = function(t) { + return this.peekIdent(t) ? (this.consumeToken(), !0) : !1; + }, e.prototype.acceptKeyword = function(t) { + return this.peekKeyword(t) ? (this.consumeToken(), !0) : !1; + }, e.prototype.acceptDelim = function(t) { + return this.peekDelim(t) ? (this.consumeToken(), !0) : !1; + }, e.prototype.acceptRegexp = function(t) { + return t.test(this.token.text) ? (this.consumeToken(), !0) : !1; + }, e.prototype._parseRegexp = function(t) { + var n = this.createNode(m.Identifier); + do ; - if (!this.acceptDelim("|")) { - this.restoreAtMark(pos); + while (this.acceptRegexp(t)); + return this.finish(n); + }, e.prototype.acceptUnquotedString = function() { + var t = this.scanner.pos(); + this.scanner.goBackTo(this.token.offset); + var n = this.scanner.scanUnquotedString(); + return n ? (this.token = n, this.consumeToken(), !0) : (this.scanner.goBackTo(t), !1); + }, e.prototype.resync = function(t, n) { + for (; ; ) { + if (t && t.indexOf(this.token.type) !== -1) + return this.consumeToken(), !0; + if (n && n.indexOf(this.token.type) !== -1) + return !0; + if (this.token.type === u.EOF) + return !1; + this.token = this.scanner.scan(); + } + }, e.prototype.createNode = function(t) { + return new L(this.token.offset, this.token.len, t); + }, e.prototype.create = function(t) { + return new t(this.token.offset, this.token.len); + }, e.prototype.finish = function(t, n, r, i) { + if (!(t instanceof me) && (n && this.markError(t, n, r, i), this.prevToken)) { + var a = this.prevToken.offset + this.prevToken.len; + t.length = a > t.offset ? a - t.offset : 0; + } + return t; + }, e.prototype.markError = function(t, n, r, i) { + this.token !== this.lastErrorToken && (t.addIssue(new bo(t, n, _e.Error, void 0, this.token.offset, this.token.len)), this.lastErrorToken = this.token), (r || i) && this.resync(r, i); + }, e.prototype.parseStylesheet = function(t) { + var n = t.version, r = t.getText(), i = function(a, o) { + if (t.version !== n) + throw new Error("Underlying model has changed, AST is no longer valid"); + return r.substr(a, o); + }; + return this.internalParse(r, this._parseStylesheet, i); + }, e.prototype.internalParse = function(t, n, r) { + this.scanner.setSource(t), this.token = this.scanner.scan(); + var i = n.bind(this)(); + return i && (r ? i.textProvider = r : i.textProvider = function(a, o) { + return t.substr(a, o); + }), i; + }, e.prototype._parseStylesheet = function() { + for (var t = this.create(Pc); t.addChild(this._parseStylesheetStart()); ) + ; + var n = !1; + do { + var r = !1; + do { + r = !1; + var i = this._parseStylesheetStatement(); + for (i && (t.addChild(i), r = !0, n = !1, !this.peek(u.EOF) && this._needsSemicolonAfter(i) && !this.accept(u.SemiColon) && this.markError(t, v.SemiColonExpected)); this.accept(u.SemiColon) || this.accept(u.CDO) || this.accept(u.CDC); ) + r = !0, n = !1; + } while (r); + if (this.peek(u.EOF)) + break; + n || (this.peek(u.AtKeyword) ? this.markError(t, v.UnknownAtRule) : this.markError(t, v.RuleOrSelectorExpected), n = !0), this.consumeToken(); + } while (!this.peek(u.EOF)); + return this.finish(t); + }, e.prototype._parseStylesheetStart = function() { + return this._parseCharset(); + }, e.prototype._parseStylesheetStatement = function(t) { + return t === void 0 && (t = !1), this.peek(u.AtKeyword) ? this._parseStylesheetAtStatement(t) : this._parseRuleset(t); + }, e.prototype._parseStylesheetAtStatement = function(t) { + return t === void 0 && (t = !1), this._parseImport() || this._parseMedia(t) || this._parsePage() || this._parseFontFace() || this._parseKeyframe() || this._parseSupports(t) || this._parseViewPort() || this._parseNamespace() || this._parseDocument() || this._parseUnknownAtRule(); + }, e.prototype._tryParseRuleset = function(t) { + var n = this.mark(); + if (this._parseSelector(t)) { + for (; this.accept(u.Comma) && this._parseSelector(t); ) + ; + if (this.accept(u.CurlyL)) + return this.restoreAtMark(n), this._parseRuleset(t); + } + return this.restoreAtMark(n), null; + }, e.prototype._parseRuleset = function(t) { + t === void 0 && (t = !1); + var n = this.create(Ct), r = n.getSelectors(); + if (!r.addChild(this._parseSelector(t))) return null; + for (; this.accept(u.Comma); ) + if (!r.addChild(this._parseSelector(t))) + return this.finish(n, v.SelectorExpected); + return this._parseBody(n, this._parseRuleSetDeclaration.bind(this)); + }, e.prototype._parseRuleSetDeclarationAtStatement = function() { + return this._parseUnknownAtRule(); + }, e.prototype._parseRuleSetDeclaration = function() { + return this.peek(u.AtKeyword) ? this._parseRuleSetDeclarationAtStatement() : this._parseDeclaration(); + }, e.prototype._needsSemicolonAfter = function(t) { + switch (t.type) { + case m.Keyframe: + case m.ViewPort: + case m.Media: + case m.Ruleset: + case m.Namespace: + case m.If: + case m.For: + case m.Each: + case m.While: + case m.MixinDeclaration: + case m.FunctionDeclaration: + case m.MixinContentDeclaration: + return !1; + case m.ExtendsReference: + case m.MixinContentReference: + case m.ReturnStatement: + case m.MediaQuery: + case m.Debug: + case m.Import: + case m.AtApplyRule: + case m.CustomPropertyDeclaration: + return !0; + case m.VariableDeclaration: + return t.needsSemicolon; + case m.MixinReference: + return !t.getContent(); + case m.Declaration: + return !t.getNestedProperties(); } - return this.finish(node); - }; - Parser2.prototype._parseAttrib = function() { - if (!this.peek(TokenType.BracketL)) { + return !1; + }, e.prototype._parseDeclarations = function(t) { + var n = this.create(ti); + if (!this.accept(u.CurlyL)) return null; + for (var r = t(); n.addChild(r) && !this.peek(u.CurlyR); ) { + if (this._needsSemicolonAfter(r) && !this.accept(u.SemiColon)) + return this.finish(n, v.SemiColonExpected, [u.SemiColon, u.CurlyR]); + for (r && this.prevToken && this.prevToken.type === u.SemiColon && (r.semicolonPosition = this.prevToken.offset); this.accept(u.SemiColon); ) + ; + r = t(); } - var node = this.create(AttributeSelector); - this.consumeToken(); - node.setNamespacePrefix(this._parseNamespacePrefix()); - if (!node.setIdentifier(this._parseIdent())) { - return this.finish(node, ParseError.IdentifierExpected); - } - if (node.setOperator(this._parseOperator())) { - node.setValue(this._parseBinaryExpr()); - this.acceptIdent("i"); - this.acceptIdent("s"); - } - if (!this.accept(TokenType.BracketR)) { - return this.finish(node, ParseError.RightSquareBracketExpected); - } - return this.finish(node); - }; - Parser2.prototype._parsePseudo = function() { - var _this = this; - var node = this._tryParsePseudoIdentifier(); - if (node) { - if (!this.hasWhitespace() && this.accept(TokenType.ParenthesisL)) { - var tryAsSelector = function() { - var selectors = _this.create(Node); - if (!selectors.addChild(_this._parseSelector(false))) { - return null; - } - while (_this.accept(TokenType.Comma) && selectors.addChild(_this._parseSelector(false))) { - } - if (_this.peek(TokenType.ParenthesisR)) { - return _this.finish(selectors); - } - return null; - }; - node.addChild(this.try(tryAsSelector) || this._parseBinaryExpr()); - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - } - return this.finish(node); - } - return null; - }; - Parser2.prototype._tryParsePseudoIdentifier = function() { - if (!this.peek(TokenType.Colon)) { + return this.accept(u.CurlyR) ? this.finish(n) : this.finish(n, v.RightCurlyExpected, [u.CurlyR, u.SemiColon]); + }, e.prototype._parseBody = function(t, n) { + return t.setDeclarations(this._parseDeclarations(n)) ? this.finish(t) : this.finish(t, v.LeftCurlyExpected, [u.CurlyR, u.SemiColon]); + }, e.prototype._parseSelector = function(t) { + var n = this.create(tn), r = !1; + for (t && (r = n.addChild(this._parseCombinator())); n.addChild(this._parseSimpleSelector()); ) + r = !0, n.addChild(this._parseCombinator()); + return r ? this.finish(n) : null; + }, e.prototype._parseDeclaration = function(t) { + var n = this._tryParseCustomPropertyDeclaration(t); + if (n) + return n; + var r = this.create(Ve); + return r.setProperty(this._parseProperty()) ? this.accept(u.Colon) ? (this.prevToken && (r.colonPosition = this.prevToken.offset), r.setValue(this._parseExpr()) ? (r.addChild(this._parsePrio()), this.peek(u.SemiColon) && (r.semicolonPosition = this.token.offset), this.finish(r)) : this.finish(r, v.PropertyValueExpected)) : this.finish(r, v.ColonExpected, [u.Colon], t || [u.SemiColon]) : null; + }, e.prototype._tryParseCustomPropertyDeclaration = function(t) { + if (!this.peekRegExp(u.Ident, /^--/)) return null; - } - var pos = this.mark(); - var node = this.createNode(NodeType.PseudoSelector); - this.consumeToken(); - if (this.hasWhitespace()) { - this.restoreAtMark(pos); + var n = this.create(Lc); + if (!n.setProperty(this._parseProperty())) return null; + if (!this.accept(u.Colon)) + return this.finish(n, v.ColonExpected, [u.Colon]); + this.prevToken && (n.colonPosition = this.prevToken.offset); + var r = this.mark(); + if (this.peek(u.CurlyL)) { + var i = this.create(Ic), a = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this)); + if (i.setDeclarations(a) && !a.isErroneous(!0) && (i.addChild(this._parsePrio()), this.peek(u.SemiColon))) + return this.finish(i), n.setPropertySet(i), n.semicolonPosition = this.token.offset, this.finish(n); + this.restoreAtMark(r); } - this.accept(TokenType.Colon); - if (this.hasWhitespace() || !node.addChild(this._parseIdent())) { - return this.finish(node, ParseError.IdentifierExpected); - } - return this.finish(node); - }; - Parser2.prototype._tryParsePrio = function() { - var mark = this.mark(); - var prio = this._parsePrio(); - if (prio) { - return prio; - } - this.restoreAtMark(mark); - return null; - }; - Parser2.prototype._parsePrio = function() { - if (!this.peek(TokenType.Exclamation)) { - return null; - } - var node = this.createNode(NodeType.Prio); - if (this.accept(TokenType.Exclamation) && this.acceptIdent("important")) { - return this.finish(node); - } - return null; - }; - Parser2.prototype._parseExpr = function(stopOnComma) { - if (stopOnComma === void 0) { - stopOnComma = false; - } - var node = this.create(Expression); - if (!node.addChild(this._parseBinaryExpr())) { - return null; - } - while (true) { - if (this.peek(TokenType.Comma)) { - if (stopOnComma) { - return this.finish(node); + var o = this._parseExpr(); + return o && !o.isErroneous(!0) && (this._parsePrio(), this.peekOne.apply(this, _s(_s([], t || [], !1), [u.SemiColon, u.EOF], !1))) ? (n.setValue(o), this.peek(u.SemiColon) && (n.semicolonPosition = this.token.offset), this.finish(n)) : (this.restoreAtMark(r), n.addChild(this._parseCustomPropertyValue(t)), n.addChild(this._parsePrio()), Ee(n.colonPosition) && this.token.offset === n.colonPosition + 1 ? this.finish(n, v.PropertyValueExpected) : this.finish(n)); + }, e.prototype._parseCustomPropertyValue = function(t) { + var n = this; + t === void 0 && (t = [u.CurlyR]); + var r = this.create(L), i = function() { + return o === 0 && l === 0 && h === 0; + }, a = function() { + return t.indexOf(n.token.type) !== -1; + }, o = 0, l = 0, h = 0; + e: + for (; ; ) { + switch (this.token.type) { + case u.SemiColon: + if (i()) + break e; + break; + case u.Exclamation: + if (i()) + break e; + break; + case u.CurlyL: + o++; + break; + case u.CurlyR: + if (o--, o < 0) { + if (a() && l === 0 && h === 0) + break e; + return this.finish(r, v.LeftCurlyExpected); + } + break; + case u.ParenthesisL: + l++; + break; + case u.ParenthesisR: + if (l--, l < 0) { + if (a() && h === 0 && o === 0) + break e; + return this.finish(r, v.LeftParenthesisExpected); + } + break; + case u.BracketL: + h++; + break; + case u.BracketR: + if (h--, h < 0) + return this.finish(r, v.LeftSquareBracketExpected); + break; + case u.BadString: + break e; + case u.EOF: + var c = v.RightCurlyExpected; + return h > 0 ? c = v.RightSquareBracketExpected : l > 0 && (c = v.RightParenthesisExpected), this.finish(r, c); } this.consumeToken(); } - if (!node.addChild(this._parseBinaryExpr())) { - break; - } - } - return this.finish(node); - }; - Parser2.prototype._parseNamedLine = function() { - if (!this.peek(TokenType.BracketL)) { + return this.finish(r); + }, e.prototype._tryToParseDeclaration = function(t) { + var n = this.mark(); + return this._parseProperty() && this.accept(u.Colon) ? (this.restoreAtMark(n), this._parseDeclaration(t)) : (this.restoreAtMark(n), null); + }, e.prototype._parseProperty = function() { + var t = this.create(ri), n = this.mark(); + return (this.acceptDelim("*") || this.acceptDelim("_")) && this.hasWhitespace() ? (this.restoreAtMark(n), null) : t.setIdentifier(this._parsePropertyIdentifier()) ? this.finish(t) : null; + }, e.prototype._parsePropertyIdentifier = function() { + return this._parseIdent(); + }, e.prototype._parseCharset = function() { + if (!this.peek(u.Charset)) return null; - } - var node = this.createNode(NodeType.GridLine); - this.consumeToken(); - while (node.addChild(this._parseIdent())) { - } - if (!this.accept(TokenType.BracketR)) { - return this.finish(node, ParseError.RightSquareBracketExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseBinaryExpr = function(preparsedLeft, preparsedOper) { - var node = this.create(BinaryExpression); - if (!node.setLeft(preparsedLeft || this._parseTerm())) { + var t = this.create(L); + return this.consumeToken(), this.accept(u.String) ? this.accept(u.SemiColon) ? this.finish(t) : this.finish(t, v.SemiColonExpected) : this.finish(t, v.IdentifierExpected); + }, e.prototype._parseImport = function() { + if (!this.peekKeyword("@import")) return null; - } - if (!node.setOperator(preparsedOper || this._parseOperator())) { - return this.finish(node); - } - if (!node.setRight(this._parseTerm())) { - return this.finish(node, ParseError.TermExpected); - } - node = this.finish(node); - var operator = this._parseOperator(); - if (operator) { - node = this._parseBinaryExpr(node, operator); - } - return this.finish(node); - }; - Parser2.prototype._parseTerm = function() { - var node = this.create(Term); - node.setOperator(this._parseUnaryOperator()); - if (node.setExpression(this._parseTermExpression())) { - return this.finish(node); - } - return null; - }; - Parser2.prototype._parseTermExpression = function() { - return this._parseURILiteral() || this._parseFunction() || this._parseIdent() || this._parseStringLiteral() || this._parseNumeric() || this._parseHexColor() || this._parseOperation() || this._parseNamedLine(); - }; - Parser2.prototype._parseOperation = function() { - if (!this.peek(TokenType.ParenthesisL)) { + var t = this.create(ii); + return this.consumeToken(), !t.addChild(this._parseURILiteral()) && !t.addChild(this._parseStringLiteral()) ? this.finish(t, v.URIOrStringExpected) : (!this.peek(u.SemiColon) && !this.peek(u.EOF) && t.setMedialist(this._parseMediaQueryList()), this.finish(t)); + }, e.prototype._parseNamespace = function() { + if (!this.peekKeyword("@namespace")) return null; - } - var node = this.create(Node); - this.consumeToken(); - node.addChild(this._parseExpr()); - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseNumeric = function() { - if (this.peek(TokenType.Num) || this.peek(TokenType.Percentage) || this.peek(TokenType.Resolution) || this.peek(TokenType.Length) || this.peek(TokenType.EMS) || this.peek(TokenType.EXS) || this.peek(TokenType.Angle) || this.peek(TokenType.Time) || this.peek(TokenType.Dimension) || this.peek(TokenType.Freq)) { - var node = this.create(NumericValue); - this.consumeToken(); - return this.finish(node); - } - return null; - }; - Parser2.prototype._parseStringLiteral = function() { - if (!this.peek(TokenType.String) && !this.peek(TokenType.BadString)) { + var t = this.create(Jc); + return this.consumeToken(), !t.addChild(this._parseURILiteral()) && (t.addChild(this._parseIdent()), !t.addChild(this._parseURILiteral()) && !t.addChild(this._parseStringLiteral())) ? this.finish(t, v.URIExpected, [u.SemiColon]) : this.accept(u.SemiColon) ? this.finish(t) : this.finish(t, v.SemiColonExpected); + }, e.prototype._parseFontFace = function() { + if (!this.peekKeyword("@font-face")) return null; - } - var node = this.createNode(NodeType.StringLiteral); - this.consumeToken(); - return this.finish(node); - }; - Parser2.prototype._parseURILiteral = function() { - if (!this.peekRegExp(TokenType.Ident, /^url(-prefix)?$/i)) { + var t = this.create(lo); + return this.consumeToken(), this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); + }, e.prototype._parseViewPort = function() { + if (!this.peekKeyword("@-ms-viewport") && !this.peekKeyword("@-o-viewport") && !this.peekKeyword("@viewport")) return null; - } - var pos = this.mark(); - var node = this.createNode(NodeType.URILiteral); - this.accept(TokenType.Ident); - if (this.hasWhitespace() || !this.peek(TokenType.ParenthesisL)) { - this.restoreAtMark(pos); + var t = this.create(jc); + return this.consumeToken(), this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); + }, e.prototype._parseKeyframe = function() { + if (!this.peekRegExp(u.AtKeyword, this.keyframeRegex)) return null; - } - this.scanner.inURL = true; - this.consumeToken(); - node.addChild(this._parseURLArgument()); - this.scanner.inURL = false; - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseURLArgument = function() { - var node = this.create(Node); - if (!this.accept(TokenType.String) && !this.accept(TokenType.BadString) && !this.acceptUnquotedString()) { + var t = this.create(ho), n = this.create(L); + return this.consumeToken(), t.setKeyword(this.finish(n)), n.matches("@-ms-keyframes") && this.markError(n, v.UnknownKeyword), t.setIdentifier(this._parseKeyframeIdent()) ? this._parseBody(t, this._parseKeyframeSelector.bind(this)) : this.finish(t, v.IdentifierExpected, [u.CurlyR]); + }, e.prototype._parseKeyframeIdent = function() { + return this._parseIdent([G.Keyframe]); + }, e.prototype._parseKeyframeSelector = function() { + var t = this.create(Ia); + if (!t.addChild(this._parseIdent()) && !this.accept(u.Percentage)) return null; - } - return this.finish(node); - }; - Parser2.prototype._parseIdent = function(referenceTypes) { - if (!this.peek(TokenType.Ident)) { + for (; this.accept(u.Comma); ) + if (!t.addChild(this._parseIdent()) && !this.accept(u.Percentage)) + return this.finish(t, v.PercentageExpected); + return this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); + }, e.prototype._tryParseKeyframeSelector = function() { + var t = this.create(Ia), n = this.mark(); + if (!t.addChild(this._parseIdent()) && !this.accept(u.Percentage)) return null; - } - var node = this.create(Identifier); - if (referenceTypes) { - node.referenceTypes = referenceTypes; - } - node.isCustomProperty = this.peekRegExp(TokenType.Ident, /^--/); - this.consumeToken(); - return this.finish(node); - }; - Parser2.prototype._parseFunction = function() { - var pos = this.mark(); - var node = this.create(Function); - if (!node.setIdentifier(this._parseFunctionIdentifier())) { + for (; this.accept(u.Comma); ) + if (!t.addChild(this._parseIdent()) && !this.accept(u.Percentage)) + return this.restoreAtMark(n), null; + return this.peek(u.CurlyL) ? this._parseBody(t, this._parseRuleSetDeclaration.bind(this)) : (this.restoreAtMark(n), null); + }, e.prototype._parseSupports = function(t) { + if (t === void 0 && (t = !1), !this.peekKeyword("@supports")) return null; + var n = this.create(Ar); + return this.consumeToken(), n.addChild(this._parseSupportsCondition()), this._parseBody(n, this._parseSupportsDeclaration.bind(this, t)); + }, e.prototype._parseSupportsDeclaration = function(t) { + return t === void 0 && (t = !1), t ? this._tryParseRuleset(!0) || this._tryToParseDeclaration() || this._parseStylesheetStatement(!0) : this._parseStylesheetStatement(!1); + }, e.prototype._parseSupportsCondition = function() { + var t = this.create(Ut); + if (this.acceptIdent("not")) + t.addChild(this._parseSupportsConditionInParens()); + else if (t.addChild(this._parseSupportsConditionInParens()), this.peekRegExp(u.Ident, /^(and|or)$/i)) + for (var n = this.token.text.toLowerCase(); this.acceptIdent(n); ) + t.addChild(this._parseSupportsConditionInParens()); + return this.finish(t); + }, e.prototype._parseSupportsConditionInParens = function() { + var t = this.create(Ut); + if (this.accept(u.ParenthesisL)) + return this.prevToken && (t.lParent = this.prevToken.offset), !t.addChild(this._tryToParseDeclaration([u.ParenthesisR])) && !this._parseSupportsCondition() ? this.finish(t, v.ConditionExpected) : this.accept(u.ParenthesisR) ? (this.prevToken && (t.rParent = this.prevToken.offset), this.finish(t)) : this.finish(t, v.RightParenthesisExpected, [u.ParenthesisR], []); + if (this.peek(u.Ident)) { + var n = this.mark(); + if (this.consumeToken(), !this.hasWhitespace() && this.accept(u.ParenthesisL)) { + for (var r = 1; this.token.type !== u.EOF && r !== 0; ) + this.token.type === u.ParenthesisL ? r++ : this.token.type === u.ParenthesisR && r--, this.consumeToken(); + return this.finish(t); + } else + this.restoreAtMark(n); } - if (this.hasWhitespace() || !this.accept(TokenType.ParenthesisL)) { - this.restoreAtMark(pos); + return this.finish(t, v.LeftParenthesisExpected, [], [u.ParenthesisL]); + }, e.prototype._parseMediaDeclaration = function(t) { + return t === void 0 && (t = !1), t ? this._tryParseRuleset(!0) || this._tryToParseDeclaration() || this._parseStylesheetStatement(!0) : this._parseStylesheetStatement(!1); + }, e.prototype._parseMedia = function(t) { + if (t === void 0 && (t = !1), !this.peekKeyword("@media")) return null; + var n = this.create(uo); + return this.consumeToken(), n.addChild(this._parseMediaQueryList()) ? this._parseBody(n, this._parseMediaDeclaration.bind(this, t)) : this.finish(n, v.MediaQueryExpected); + }, e.prototype._parseMediaQueryList = function() { + var t = this.create(po); + if (!t.addChild(this._parseMediaQuery())) + return this.finish(t, v.MediaQueryExpected); + for (; this.accept(u.Comma); ) + if (!t.addChild(this._parseMediaQuery())) + return this.finish(t, v.MediaQueryExpected); + return this.finish(t); + }, e.prototype._parseMediaQuery = function() { + var t = this.create(fo), n = this.mark(); + if (this.acceptIdent("not"), this.peek(u.ParenthesisL)) + this.restoreAtMark(n), t.addChild(this._parseMediaCondition()); + else { + if (this.acceptIdent("only"), !t.addChild(this._parseIdent())) + return null; + this.acceptIdent("and") && t.addChild(this._parseMediaCondition()); } - if (node.getArguments().addChild(this._parseFunctionArgument())) { - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getArguments().addChild(this._parseFunctionArgument())) { - this.markError(node, ParseError.ExpressionExpected); - } - } + return this.finish(t); + }, e.prototype._parseRatio = function() { + var t = this.mark(), n = this.create(nh); + return this._parseNumeric() ? this.acceptDelim("/") ? this._parseNumeric() ? this.finish(n) : this.finish(n, v.NumberExpected) : (this.restoreAtMark(t), null) : null; + }, e.prototype._parseMediaCondition = function() { + var t = this.create(Yc); + this.acceptIdent("not"); + for (var n = !0; n; ) { + if (!this.accept(u.ParenthesisL)) + return this.finish(t, v.LeftParenthesisExpected, [], [u.CurlyL]); + if (this.peek(u.ParenthesisL) || this.peekIdent("not") ? t.addChild(this._parseMediaCondition()) : t.addChild(this._parseMediaFeature()), !this.accept(u.ParenthesisR)) + return this.finish(t, v.RightParenthesisExpected, [], [u.CurlyL]); + n = this.acceptIdent("and") || this.acceptIdent("or"); } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - return this.finish(node); - }; - Parser2.prototype._parseFunctionIdentifier = function() { - if (!this.peek(TokenType.Ident)) { - return null; - } - var node = this.create(Identifier); - node.referenceTypes = [ReferenceType.Function]; - if (this.acceptIdent("progid")) { - if (this.accept(TokenType.Colon)) { - while (this.accept(TokenType.Ident) && this.acceptDelim(".")) { - } - } - return this.finish(node); - } - this.consumeToken(); - return this.finish(node); - }; - Parser2.prototype._parseFunctionArgument = function() { - var node = this.create(FunctionArgument); - if (node.setValue(this._parseExpr(true))) { - return this.finish(node); - } - return null; - }; - Parser2.prototype._parseHexColor = function() { - if (this.peekRegExp(TokenType.Hash, /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)) { - var node = this.create(HexColorValue); - this.consumeToken(); - return this.finish(node); - } else { - return null; - } - }; - return Parser2; -}(); -function findFirst(array, p) { - var low = 0, high = array.length; - if (high === 0) { - return 0; - } - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (p(array[mid])) { - high = mid; - } else { - low = mid + 1; - } - } - return low; -} -function includes(array, item) { - return array.indexOf(item) !== -1; -} -function union() { - var arrays = []; - for (var _i = 0; _i < arguments.length; _i++) { - arrays[_i] = arguments[_i]; - } - var result = []; - for (var _a2 = 0, arrays_1 = arrays; _a2 < arrays_1.length; _a2++) { - var array = arrays_1[_a2]; - for (var _b = 0, array_1 = array; _b < array_1.length; _b++) { - var item = array_1[_b]; - if (!includes(result, item)) { - result.push(item); - } - } - } - return result; -} -var __extends2 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; + return this.finish(t); + }, e.prototype._parseMediaFeature = function() { + var t = this, n = [u.ParenthesisR], r = this.create(Kc), i = function() { + return t.acceptDelim("<") || t.acceptDelim(">") ? (t.hasWhitespace() || t.acceptDelim("="), !0) : !!t.acceptDelim("="); }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); -var Scope = function() { - function Scope2(offset, length) { - this.offset = offset; - this.length = length; - this.symbols = []; - this.parent = null; - this.children = []; - } - Scope2.prototype.addChild = function(scope) { - this.children.push(scope); - scope.setParent(this); - }; - Scope2.prototype.setParent = function(scope) { - this.parent = scope; - }; - Scope2.prototype.findScope = function(offset, length) { - if (length === void 0) { - length = 0; - } - if (this.offset <= offset && this.offset + this.length > offset + length || this.offset === offset && this.length === length) { - return this.findInScope(offset, length); - } - return null; - }; - Scope2.prototype.findInScope = function(offset, length) { - if (length === void 0) { - length = 0; - } - var end = offset + length; - var idx = findFirst(this.children, function(s) { - return s.offset > end; - }); - if (idx === 0) { - return this; - } - var res = this.children[idx - 1]; - if (res.offset <= offset && res.offset + res.length >= offset + length) { - return res.findInScope(offset, length); - } - return this; - }; - Scope2.prototype.addSymbol = function(symbol) { - this.symbols.push(symbol); - }; - Scope2.prototype.getSymbol = function(name, type) { - for (var index = 0; index < this.symbols.length; index++) { - var symbol = this.symbols[index]; - if (symbol.name === name && symbol.type === type) { - return symbol; + if (r.addChild(this._parseMediaFeatureName())) { + if (this.accept(u.Colon)) { + if (!r.addChild(this._parseMediaFeatureValue())) + return this.finish(r, v.TermExpected, [], n); + } else if (i()) { + if (!r.addChild(this._parseMediaFeatureValue())) + return this.finish(r, v.TermExpected, [], n); + if (i() && !r.addChild(this._parseMediaFeatureValue())) + return this.finish(r, v.TermExpected, [], n); } - } - return null; - }; - Scope2.prototype.getSymbols = function() { - return this.symbols; - }; - return Scope2; -}(); -var GlobalScope = function(_super) { - __extends2(GlobalScope2, _super); - function GlobalScope2() { - return _super.call(this, 0, Number.MAX_VALUE) || this; - } - return GlobalScope2; -}(Scope); -var Symbol2 = function() { - function Symbol3(name, value, node, type) { - this.name = name; - this.value = value; - this.node = node; - this.type = type; - } - return Symbol3; -}(); -var ScopeBuilder = function() { - function ScopeBuilder2(scope) { - this.scope = scope; - } - ScopeBuilder2.prototype.addSymbol = function(node, name, value, type) { - if (node.offset !== -1) { - var current = this.scope.findScope(node.offset, node.length); - if (current) { - current.addSymbol(new Symbol2(name, value, node, type)); - } - } - }; - ScopeBuilder2.prototype.addScope = function(node) { - if (node.offset !== -1) { - var current = this.scope.findScope(node.offset, node.length); - if (current && (current.offset !== node.offset || current.length !== node.length)) { - var newScope = new Scope(node.offset, node.length); - current.addChild(newScope); - return newScope; - } - return current; - } - return null; - }; - ScopeBuilder2.prototype.addSymbolToChildScope = function(scopeNode, node, name, value, type) { - if (scopeNode && scopeNode.offset !== -1) { - var current = this.addScope(scopeNode); - if (current) { - current.addSymbol(new Symbol2(name, value, node, type)); - } - } - }; - ScopeBuilder2.prototype.visitNode = function(node) { - switch (node.type) { - case NodeType.Keyframe: - this.addSymbol(node, node.getName(), void 0, ReferenceType.Keyframe); - return true; - case NodeType.CustomPropertyDeclaration: - return this.visitCustomPropertyDeclarationNode(node); - case NodeType.VariableDeclaration: - return this.visitVariableDeclarationNode(node); - case NodeType.Ruleset: - return this.visitRuleSet(node); - case NodeType.MixinDeclaration: - this.addSymbol(node, node.getName(), void 0, ReferenceType.Mixin); - return true; - case NodeType.FunctionDeclaration: - this.addSymbol(node, node.getName(), void 0, ReferenceType.Function); - return true; - case NodeType.FunctionParameter: { - return this.visitFunctionParameterNode(node); - } - case NodeType.Declarations: - this.addScope(node); - return true; - case NodeType.For: - var forNode = node; - var scopeNode = forNode.getDeclarations(); - if (scopeNode && forNode.variable) { - this.addSymbolToChildScope(scopeNode, forNode.variable, forNode.variable.getName(), void 0, ReferenceType.Variable); - } - return true; - case NodeType.Each: { - var eachNode = node; - var scopeNode_1 = eachNode.getDeclarations(); - if (scopeNode_1) { - var variables = eachNode.getVariables().getChildren(); - for (var _i = 0, variables_1 = variables; _i < variables_1.length; _i++) { - var variable = variables_1[_i]; - this.addSymbolToChildScope(scopeNode_1, variable, variable.getName(), void 0, ReferenceType.Variable); - } - } - return true; - } - } - return true; - }; - ScopeBuilder2.prototype.visitRuleSet = function(node) { - var current = this.scope.findScope(node.offset, node.length); - if (current) { - for (var _i = 0, _a2 = node.getSelectors().getChildren(); _i < _a2.length; _i++) { - var child = _a2[_i]; - if (child instanceof Selector) { - if (child.getChildren().length === 1) { - current.addSymbol(new Symbol2(child.getChild(0).getText(), void 0, child, ReferenceType.Rule)); - } - } - } - } - return true; - }; - ScopeBuilder2.prototype.visitVariableDeclarationNode = function(node) { - var value = node.getValue() ? node.getValue().getText() : void 0; - this.addSymbol(node, node.getName(), value, ReferenceType.Variable); - return true; - }; - ScopeBuilder2.prototype.visitFunctionParameterNode = function(node) { - var scopeNode = node.getParent().getDeclarations(); - if (scopeNode) { - var valueNode = node.getDefaultValue(); - var value = valueNode ? valueNode.getText() : void 0; - this.addSymbolToChildScope(scopeNode, node, node.getName(), value, ReferenceType.Variable); - } - return true; - }; - ScopeBuilder2.prototype.visitCustomPropertyDeclarationNode = function(node) { - var value = node.getValue() ? node.getValue().getText() : ""; - this.addCSSVariable(node.getProperty(), node.getProperty().getName(), value, ReferenceType.Variable); - return true; - }; - ScopeBuilder2.prototype.addCSSVariable = function(node, name, value, type) { - if (node.offset !== -1) { - this.scope.addSymbol(new Symbol2(name, value, node, type)); - } - }; - return ScopeBuilder2; -}(); -var Symbols = function() { - function Symbols2(node) { - this.global = new GlobalScope(); - node.acceptVisitor(new ScopeBuilder(this.global)); - } - Symbols2.prototype.findSymbolsAtOffset = function(offset, referenceType) { - var scope = this.global.findScope(offset, 0); - var result = []; - var names = {}; - while (scope) { - var symbols = scope.getSymbols(); - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; - if (symbol.type === referenceType && !names[symbol.name]) { - result.push(symbol); - names[symbol.name] = true; - } - } - scope = scope.parent; - } - return result; - }; - Symbols2.prototype.internalFindSymbol = function(node, referenceTypes) { - var scopeNode = node; - if (node.parent instanceof FunctionParameter && node.parent.getParent() instanceof BodyDeclaration) { - scopeNode = node.parent.getParent().getDeclarations(); - } - if (node.parent instanceof FunctionArgument && node.parent.getParent() instanceof Function) { - var funcId = node.parent.getParent().getIdentifier(); - if (funcId) { - var functionSymbol = this.internalFindSymbol(funcId, [ReferenceType.Function]); - if (functionSymbol) { - scopeNode = functionSymbol.node.getDeclarations(); - } - } - } - if (!scopeNode) { + } else if (r.addChild(this._parseMediaFeatureValue())) { + if (!i()) + return this.finish(r, v.OperatorExpected, [], n); + if (!r.addChild(this._parseMediaFeatureName())) + return this.finish(r, v.IdentifierExpected, [], n); + if (i() && !r.addChild(this._parseMediaFeatureValue())) + return this.finish(r, v.TermExpected, [], n); + } else + return this.finish(r, v.IdentifierExpected, [], n); + return this.finish(r); + }, e.prototype._parseMediaFeatureName = function() { + return this._parseIdent(); + }, e.prototype._parseMediaFeatureValue = function() { + return this._parseRatio() || this._parseTermExpression(); + }, e.prototype._parseMedium = function() { + var t = this.create(L); + return t.addChild(this._parseIdent()) ? this.finish(t) : null; + }, e.prototype._parsePageDeclaration = function() { + return this._parsePageMarginBox() || this._parseRuleSetDeclaration(); + }, e.prototype._parsePage = function() { + if (!this.peekKeyword("@page")) return null; + var t = this.create(Zc); + if (this.consumeToken(), t.addChild(this._parsePageSelector())) { + for (; this.accept(u.Comma); ) + if (!t.addChild(this._parsePageSelector())) + return this.finish(t, v.IdentifierExpected); } - var name = node.getText(); - var scope = this.global.findScope(scopeNode.offset, scopeNode.length); - while (scope) { - for (var index = 0; index < referenceTypes.length; index++) { - var type = referenceTypes[index]; - var symbol = scope.getSymbol(name, type); - if (symbol) { - return symbol; - } - } - scope = scope.parent; - } - return null; - }; - Symbols2.prototype.evaluateReferenceTypes = function(node) { - if (node instanceof Identifier) { - var referenceTypes = node.referenceTypes; - if (referenceTypes) { - return referenceTypes; - } else { - if (node.isCustomProperty) { - return [ReferenceType.Variable]; - } - var decl = getParentDeclaration(node); - if (decl) { - var propertyName = decl.getNonPrefixedPropertyName(); - if ((propertyName === "animation" || propertyName === "animation-name") && decl.getValue() && decl.getValue().offset === node.offset) { - return [ReferenceType.Keyframe]; - } - } - } - } else if (node instanceof Variable) { - return [ReferenceType.Variable]; - } - var selector = node.findAParent(NodeType.Selector, NodeType.ExtendsReference); - if (selector) { - return [ReferenceType.Rule]; - } - return null; - }; - Symbols2.prototype.findSymbolFromNode = function(node) { - if (!node) { + return this._parseBody(t, this._parsePageDeclaration.bind(this)); + }, e.prototype._parsePageMarginBox = function() { + if (!this.peek(u.AtKeyword)) return null; - } - while (node.type === NodeType.Interpolation) { - node = node.getParent(); - } - var referenceTypes = this.evaluateReferenceTypes(node); - if (referenceTypes) { - return this.internalFindSymbol(node, referenceTypes); - } - return null; - }; - Symbols2.prototype.matchesSymbol = function(node, symbol) { - if (!node) { - return false; - } - while (node.type === NodeType.Interpolation) { - node = node.getParent(); - } - if (!node.matches(symbol.name)) { - return false; - } - var referenceTypes = this.evaluateReferenceTypes(node); - if (!referenceTypes || referenceTypes.indexOf(symbol.type) === -1) { - return false; - } - var nodeSymbol = this.internalFindSymbol(node, referenceTypes); - return nodeSymbol === symbol; - }; - Symbols2.prototype.findSymbol = function(name, type, offset) { - var scope = this.global.findScope(offset); - while (scope) { - var symbol = scope.getSymbol(name, type); - if (symbol) { - return symbol; - } - scope = scope.parent; - } - return null; - }; - return Symbols2; -}(); -var LIB; -LIB = (() => { - var t = { 470: (t2) => { - function e2(t3) { - if (typeof t3 != "string") - throw new TypeError("Path must be a string. Received " + JSON.stringify(t3)); - } - function r2(t3, e3) { - for (var r3, n2 = "", o = 0, i = -1, a2 = 0, h = 0; h <= t3.length; ++h) { - if (h < t3.length) - r3 = t3.charCodeAt(h); - else { - if (r3 === 47) + var t = this.create(Qc); + return this.acceptOneKeyword(Ah) || this.markError(t, v.UnknownAtRule, [], [u.CurlyL]), this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); + }, e.prototype._parsePageSelector = function() { + if (!this.peek(u.Ident) && !this.peek(u.Colon)) + return null; + var t = this.create(L); + return t.addChild(this._parseIdent()), this.accept(u.Colon) && !t.addChild(this._parseIdent()) ? this.finish(t, v.IdentifierExpected) : this.finish(t); + }, e.prototype._parseDocument = function() { + if (!this.peekKeyword("@-moz-document")) + return null; + var t = this.create(Xc); + return this.consumeToken(), this.resync([], [u.CurlyL]), this._parseBody(t, this._parseStylesheetStatement.bind(this)); + }, e.prototype._parseUnknownAtRule = function() { + if (!this.peek(u.AtKeyword)) + return null; + var t = this.create(go); + t.addChild(this._parseUnknownAtRuleName()); + var n = function() { + return i === 0 && a === 0 && o === 0; + }, r = 0, i = 0, a = 0, o = 0; + e: + for (; ; ) { + switch (this.token.type) { + case u.SemiColon: + if (n()) + break e; + break; + case u.EOF: + return i > 0 ? this.finish(t, v.RightCurlyExpected) : o > 0 ? this.finish(t, v.RightSquareBracketExpected) : a > 0 ? this.finish(t, v.RightParenthesisExpected) : this.finish(t); + case u.CurlyL: + r++, i++; + break; + case u.CurlyR: + if (i--, r > 0 && i === 0) { + if (this.consumeToken(), o > 0) + return this.finish(t, v.RightSquareBracketExpected); + if (a > 0) + return this.finish(t, v.RightParenthesisExpected); + break e; + } + if (i < 0) { + if (a === 0 && o === 0) + break e; + return this.finish(t, v.LeftCurlyExpected); + } + break; + case u.ParenthesisL: + a++; + break; + case u.ParenthesisR: + if (a--, a < 0) + return this.finish(t, v.LeftParenthesisExpected); + break; + case u.BracketL: + o++; + break; + case u.BracketR: + if (o--, o < 0) + return this.finish(t, v.LeftSquareBracketExpected); break; - r3 = 47; } - if (r3 === 47) { - if (i === h - 1 || a2 === 1) + this.consumeToken(); + } + return t; + }, e.prototype._parseUnknownAtRuleName = function() { + var t = this.create(L); + return this.accept(u.AtKeyword) ? this.finish(t) : t; + }, e.prototype._parseOperator = function() { + if (this.peekDelim("/") || this.peekDelim("*") || this.peekDelim("+") || this.peekDelim("-") || this.peek(u.Dashmatch) || this.peek(u.Includes) || this.peek(u.SubstringOperator) || this.peek(u.PrefixOperator) || this.peek(u.SuffixOperator) || this.peekDelim("=")) { + var t = this.createNode(m.Operator); + return this.consumeToken(), this.finish(t); + } else + return null; + }, e.prototype._parseUnaryOperator = function() { + if (!this.peekDelim("+") && !this.peekDelim("-")) + return null; + var t = this.create(L); + return this.consumeToken(), this.finish(t); + }, e.prototype._parseCombinator = function() { + if (this.peekDelim(">")) { + var t = this.create(L); + this.consumeToken(); + var n = this.mark(); + if (!this.hasWhitespace() && this.acceptDelim(">")) { + if (!this.hasWhitespace() && this.acceptDelim(">")) + return t.type = m.SelectorCombinatorShadowPiercingDescendant, this.finish(t); + this.restoreAtMark(n); + } + return t.type = m.SelectorCombinatorParent, this.finish(t); + } else if (this.peekDelim("+")) { + var t = this.create(L); + return this.consumeToken(), t.type = m.SelectorCombinatorSibling, this.finish(t); + } else if (this.peekDelim("~")) { + var t = this.create(L); + return this.consumeToken(), t.type = m.SelectorCombinatorAllSiblings, this.finish(t); + } else if (this.peekDelim("/")) { + var t = this.create(L); + this.consumeToken(); + var n = this.mark(); + if (!this.hasWhitespace() && this.acceptIdent("deep") && !this.hasWhitespace() && this.acceptDelim("/")) + return t.type = m.SelectorCombinatorShadowPiercingDescendant, this.finish(t); + this.restoreAtMark(n); + } + return null; + }, e.prototype._parseSimpleSelector = function() { + var t = this.create(kt), n = 0; + for (t.addChild(this._parseElementName()) && n++; (n === 0 || !this.hasWhitespace()) && t.addChild(this._parseSimpleSelectorBody()); ) + n++; + return n > 0 ? this.finish(t) : null; + }, e.prototype._parseSimpleSelectorBody = function() { + return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib(); + }, e.prototype._parseSelectorIdent = function() { + return this._parseIdent(); + }, e.prototype._parseHash = function() { + if (!this.peek(u.Hash) && !this.peekDelim("#")) + return null; + var t = this.createNode(m.IdentifierSelector); + if (this.acceptDelim("#")) { + if (this.hasWhitespace() || !t.addChild(this._parseSelectorIdent())) + return this.finish(t, v.IdentifierExpected); + } else + this.consumeToken(); + return this.finish(t); + }, e.prototype._parseClass = function() { + if (!this.peekDelim(".")) + return null; + var t = this.createNode(m.ClassSelector); + return this.consumeToken(), this.hasWhitespace() || !t.addChild(this._parseSelectorIdent()) ? this.finish(t, v.IdentifierExpected) : this.finish(t); + }, e.prototype._parseElementName = function() { + var t = this.mark(), n = this.createNode(m.ElementNameSelector); + return n.addChild(this._parseNamespacePrefix()), !n.addChild(this._parseSelectorIdent()) && !this.acceptDelim("*") ? (this.restoreAtMark(t), null) : this.finish(n); + }, e.prototype._parseNamespacePrefix = function() { + var t = this.mark(), n = this.createNode(m.NamespacePrefix); + return !n.addChild(this._parseIdent()) && this.acceptDelim("*"), this.acceptDelim("|") ? this.finish(n) : (this.restoreAtMark(t), null); + }, e.prototype._parseAttrib = function() { + if (!this.peek(u.BracketL)) + return null; + var t = this.create(th); + return this.consumeToken(), t.setNamespacePrefix(this._parseNamespacePrefix()), t.setIdentifier(this._parseIdent()) ? (t.setOperator(this._parseOperator()) && (t.setValue(this._parseBinaryExpr()), this.acceptIdent("i"), this.acceptIdent("s")), this.accept(u.BracketR) ? this.finish(t) : this.finish(t, v.RightSquareBracketExpected)) : this.finish(t, v.IdentifierExpected); + }, e.prototype._parsePseudo = function() { + var t = this, n = this._tryParsePseudoIdentifier(); + if (n) { + if (!this.hasWhitespace() && this.accept(u.ParenthesisL)) { + var r = function() { + var i = t.create(L); + if (!i.addChild(t._parseSelector(!1))) + return null; + for (; t.accept(u.Comma) && i.addChild(t._parseSelector(!1)); ) ; - else if (i !== h - 1 && a2 === 2) { - if (n2.length < 2 || o !== 2 || n2.charCodeAt(n2.length - 1) !== 46 || n2.charCodeAt(n2.length - 2) !== 46) { - if (n2.length > 2) { - var s = n2.lastIndexOf("/"); - if (s !== n2.length - 1) { - s === -1 ? (n2 = "", o = 0) : o = (n2 = n2.slice(0, s)).length - 1 - n2.lastIndexOf("/"), i = h, a2 = 0; + return t.peek(u.ParenthesisR) ? t.finish(i) : null; + }; + if (n.addChild(this.try(r) || this._parseBinaryExpr()), !this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected); + } + return this.finish(n); + } + return null; + }, e.prototype._tryParsePseudoIdentifier = function() { + if (!this.peek(u.Colon)) + return null; + var t = this.mark(), n = this.createNode(m.PseudoSelector); + return this.consumeToken(), this.hasWhitespace() ? (this.restoreAtMark(t), null) : (this.accept(u.Colon), this.hasWhitespace() || !n.addChild(this._parseIdent()) ? this.finish(n, v.IdentifierExpected) : this.finish(n)); + }, e.prototype._tryParsePrio = function() { + var t = this.mark(), n = this._parsePrio(); + return n || (this.restoreAtMark(t), null); + }, e.prototype._parsePrio = function() { + if (!this.peek(u.Exclamation)) + return null; + var t = this.createNode(m.Prio); + return this.accept(u.Exclamation) && this.acceptIdent("important") ? this.finish(t) : null; + }, e.prototype._parseExpr = function(t) { + t === void 0 && (t = !1); + var n = this.create(mo); + if (!n.addChild(this._parseBinaryExpr())) + return null; + for (; ; ) { + if (this.peek(u.Comma)) { + if (t) + return this.finish(n); + this.consumeToken(); + } + if (!n.addChild(this._parseBinaryExpr())) + break; + } + return this.finish(n); + }, e.prototype._parseNamedLine = function() { + if (!this.peek(u.BracketL)) + return null; + var t = this.createNode(m.GridLine); + for (this.consumeToken(); t.addChild(this._parseIdent()); ) + ; + return this.accept(u.BracketR) ? this.finish(t) : this.finish(t, v.RightSquareBracketExpected); + }, e.prototype._parseBinaryExpr = function(t, n) { + var r = this.create(ai); + if (!r.setLeft(t || this._parseTerm())) + return null; + if (!r.setOperator(n || this._parseOperator())) + return this.finish(r); + if (!r.setRight(this._parseTerm())) + return this.finish(r, v.TermExpected); + r = this.finish(r); + var i = this._parseOperator(); + return i && (r = this._parseBinaryExpr(r, i)), this.finish(r); + }, e.prototype._parseTerm = function() { + var t = this.create(eh); + return t.setOperator(this._parseUnaryOperator()), t.setExpression(this._parseTermExpression()) ? this.finish(t) : null; + }, e.prototype._parseTermExpression = function() { + return this._parseURILiteral() || this._parseFunction() || this._parseIdent() || this._parseStringLiteral() || this._parseNumeric() || this._parseHexColor() || this._parseOperation() || this._parseNamedLine(); + }, e.prototype._parseOperation = function() { + if (!this.peek(u.ParenthesisL)) + return null; + var t = this.create(L); + return this.consumeToken(), t.addChild(this._parseExpr()), this.accept(u.ParenthesisR) ? this.finish(t) : this.finish(t, v.RightParenthesisExpected); + }, e.prototype._parseNumeric = function() { + if (this.peek(u.Num) || this.peek(u.Percentage) || this.peek(u.Resolution) || this.peek(u.Length) || this.peek(u.EMS) || this.peek(u.EXS) || this.peek(u.Angle) || this.peek(u.Time) || this.peek(u.Dimension) || this.peek(u.Freq)) { + var t = this.create(oi); + return this.consumeToken(), this.finish(t); + } + return null; + }, e.prototype._parseStringLiteral = function() { + if (!this.peek(u.String) && !this.peek(u.BadString)) + return null; + var t = this.createNode(m.StringLiteral); + return this.consumeToken(), this.finish(t); + }, e.prototype._parseURILiteral = function() { + if (!this.peekRegExp(u.Ident, /^url(-prefix)?$/i)) + return null; + var t = this.mark(), n = this.createNode(m.URILiteral); + return this.accept(u.Ident), this.hasWhitespace() || !this.peek(u.ParenthesisL) ? (this.restoreAtMark(t), null) : (this.scanner.inURL = !0, this.consumeToken(), n.addChild(this._parseURLArgument()), this.scanner.inURL = !1, this.accept(u.ParenthesisR) ? this.finish(n) : this.finish(n, v.RightParenthesisExpected)); + }, e.prototype._parseURLArgument = function() { + var t = this.create(L); + return !this.accept(u.String) && !this.accept(u.BadString) && !this.acceptUnquotedString() ? null : this.finish(t); + }, e.prototype._parseIdent = function(t) { + if (!this.peek(u.Ident)) + return null; + var n = this.create(Re); + return t && (n.referenceTypes = t), n.isCustomProperty = this.peekRegExp(u.Ident, /^--/), this.consumeToken(), this.finish(n); + }, e.prototype._parseFunction = function() { + var t = this.mark(), n = this.create(nn); + if (!n.setIdentifier(this._parseFunctionIdentifier())) + return null; + if (this.hasWhitespace() || !this.accept(u.ParenthesisL)) + return this.restoreAtMark(t), null; + if (n.getArguments().addChild(this._parseFunctionArgument())) + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + n.getArguments().addChild(this._parseFunctionArgument()) || this.markError(n, v.ExpressionExpected); + return this.accept(u.ParenthesisR) ? this.finish(n) : this.finish(n, v.RightParenthesisExpected); + }, e.prototype._parseFunctionIdentifier = function() { + if (!this.peek(u.Ident)) + return null; + var t = this.create(Re); + if (t.referenceTypes = [G.Function], this.acceptIdent("progid")) { + if (this.accept(u.Colon)) + for (; this.accept(u.Ident) && this.acceptDelim("."); ) + ; + return this.finish(t); + } + return this.consumeToken(), this.finish(t); + }, e.prototype._parseFunctionArgument = function() { + var t = this.create(Dt); + return t.setValue(this._parseExpr(!0)) ? this.finish(t) : null; + }, e.prototype._parseHexColor = function() { + if (this.peekRegExp(u.Hash, /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)) { + var t = this.create(si); + return this.consumeToken(), this.finish(t); + } else + return null; + }, e; +}(); +function zh(e, t) { + var n = 0, r = e.length; + if (r === 0) + return 0; + for (; n < r; ) { + var i = Math.floor((n + r) / 2); + t(e[i]) ? r = i : n = i + 1; + } + return n; +} +function So(e, t) { + return e.indexOf(t) !== -1; +} +function pn() { + for (var e = [], t = 0; t < arguments.length; t++) + e[t] = arguments[t]; + for (var n = [], r = 0, i = e; r < i.length; r++) + for (var a = i[r], o = 0, l = a; o < l.length; o++) { + var h = l[o]; + So(n, h) || n.push(h); + } + return n; +} +var Mh = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); + }; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; + } + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); + }; +}(), Co = function() { + function e(t, n) { + this.offset = t, this.length = n, this.symbols = [], this.parent = null, this.children = []; + } + return e.prototype.addChild = function(t) { + this.children.push(t), t.setParent(this); + }, e.prototype.setParent = function(t) { + this.parent = t; + }, e.prototype.findScope = function(t, n) { + return n === void 0 && (n = 0), this.offset <= t && this.offset + this.length > t + n || this.offset === t && this.length === n ? this.findInScope(t, n) : null; + }, e.prototype.findInScope = function(t, n) { + n === void 0 && (n = 0); + var r = t + n, i = zh(this.children, function(o) { + return o.offset > r; + }); + if (i === 0) + return this; + var a = this.children[i - 1]; + return a.offset <= t && a.offset + a.length >= t + n ? a.findInScope(t, n) : this; + }, e.prototype.addSymbol = function(t) { + this.symbols.push(t); + }, e.prototype.getSymbol = function(t, n) { + for (var r = 0; r < this.symbols.length; r++) { + var i = this.symbols[r]; + if (i.name === t && i.type === n) + return i; + } + return null; + }, e.prototype.getSymbols = function() { + return this.symbols; + }, e; +}(), Nh = function(e) { + Mh(t, e); + function t() { + return e.call(this, 0, Number.MAX_VALUE) || this; + } + return t; +}(Co), fn = function() { + function e(t, n, r, i) { + this.name = t, this.value = n, this.node = r, this.type = i; + } + return e; +}(), Ph = function() { + function e(t) { + this.scope = t; + } + return e.prototype.addSymbol = function(t, n, r, i) { + if (t.offset !== -1) { + var a = this.scope.findScope(t.offset, t.length); + a && a.addSymbol(new fn(n, r, t, i)); + } + }, e.prototype.addScope = function(t) { + if (t.offset !== -1) { + var n = this.scope.findScope(t.offset, t.length); + if (n && (n.offset !== t.offset || n.length !== t.length)) { + var r = new Co(t.offset, t.length); + return n.addChild(r), r; + } + return n; + } + return null; + }, e.prototype.addSymbolToChildScope = function(t, n, r, i, a) { + if (t && t.offset !== -1) { + var o = this.addScope(t); + o && o.addSymbol(new fn(r, i, n, a)); + } + }, e.prototype.visitNode = function(t) { + switch (t.type) { + case m.Keyframe: + return this.addSymbol(t, t.getName(), void 0, G.Keyframe), !0; + case m.CustomPropertyDeclaration: + return this.visitCustomPropertyDeclarationNode(t); + case m.VariableDeclaration: + return this.visitVariableDeclarationNode(t); + case m.Ruleset: + return this.visitRuleSet(t); + case m.MixinDeclaration: + return this.addSymbol(t, t.getName(), void 0, G.Mixin), !0; + case m.FunctionDeclaration: + return this.addSymbol(t, t.getName(), void 0, G.Function), !0; + case m.FunctionParameter: + return this.visitFunctionParameterNode(t); + case m.Declarations: + return this.addScope(t), !0; + case m.For: + var n = t, r = n.getDeclarations(); + return r && n.variable && this.addSymbolToChildScope(r, n.variable, n.variable.getName(), void 0, G.Variable), !0; + case m.Each: { + var i = t, a = i.getDeclarations(); + if (a) + for (var o = i.getVariables().getChildren(), l = 0, h = o; l < h.length; l++) { + var c = h[l]; + this.addSymbolToChildScope(a, c, c.getName(), void 0, G.Variable); + } + return !0; + } + } + return !0; + }, e.prototype.visitRuleSet = function(t) { + var n = this.scope.findScope(t.offset, t.length); + if (n) + for (var r = 0, i = t.getSelectors().getChildren(); r < i.length; r++) { + var a = i[r]; + a instanceof tn && a.getChildren().length === 1 && n.addSymbol(new fn(a.getChild(0).getText(), void 0, a, G.Rule)); + } + return !0; + }, e.prototype.visitVariableDeclarationNode = function(t) { + var n = t.getValue() ? t.getValue().getText() : void 0; + return this.addSymbol(t, t.getName(), n, G.Variable), !0; + }, e.prototype.visitFunctionParameterNode = function(t) { + var n = t.getParent().getDeclarations(); + if (n) { + var r = t.getDefaultValue(), i = r ? r.getText() : void 0; + this.addSymbolToChildScope(n, t, t.getName(), i, G.Variable); + } + return !0; + }, e.prototype.visitCustomPropertyDeclarationNode = function(t) { + var n = t.getValue() ? t.getValue().getText() : ""; + return this.addCSSVariable(t.getProperty(), t.getProperty().getName(), n, G.Variable), !0; + }, e.prototype.addCSSVariable = function(t, n, r, i) { + t.offset !== -1 && this.scope.addSymbol(new fn(n, r, t, i)); + }, e; +}(), Ur = function() { + function e(t) { + this.global = new Nh(), t.acceptVisitor(new Ph(this.global)); + } + return e.prototype.findSymbolsAtOffset = function(t, n) { + for (var r = this.global.findScope(t, 0), i = [], a = {}; r; ) { + for (var o = r.getSymbols(), l = 0; l < o.length; l++) { + var h = o[l]; + h.type === n && !a[h.name] && (i.push(h), a[h.name] = !0); + } + r = r.parent; + } + return i; + }, e.prototype.internalFindSymbol = function(t, n) { + var r = t; + if (t.parent instanceof On && t.parent.getParent() instanceof ne && (r = t.parent.getParent().getDeclarations()), t.parent instanceof Dt && t.parent.getParent() instanceof nn) { + var i = t.parent.getParent().getIdentifier(); + if (i) { + var a = this.internalFindSymbol(i, [G.Function]); + a && (r = a.node.getDeclarations()); + } + } + if (!r) + return null; + for (var o = t.getText(), l = this.global.findScope(r.offset, r.length); l; ) { + for (var h = 0; h < n.length; h++) { + var c = n[h], d = l.getSymbol(o, c); + if (d) + return d; + } + l = l.parent; + } + return null; + }, e.prototype.evaluateReferenceTypes = function(t) { + if (t instanceof Re) { + var n = t.referenceTypes; + if (n) + return n; + if (t.isCustomProperty) + return [G.Variable]; + var r = Nc(t); + if (r) { + var i = r.getNonPrefixedPropertyName(); + if ((i === "animation" || i === "animation-name") && r.getValue() && r.getValue().offset === t.offset) + return [G.Keyframe]; + } + } else if (t instanceof li) + return [G.Variable]; + var a = t.findAParent(m.Selector, m.ExtendsReference); + return a ? [G.Rule] : null; + }, e.prototype.findSymbolFromNode = function(t) { + if (!t) + return null; + for (; t.type === m.Interpolation; ) + t = t.getParent(); + var n = this.evaluateReferenceTypes(t); + return n ? this.internalFindSymbol(t, n) : null; + }, e.prototype.matchesSymbol = function(t, n) { + if (!t) + return !1; + for (; t.type === m.Interpolation; ) + t = t.getParent(); + if (!t.matches(n.name)) + return !1; + var r = this.evaluateReferenceTypes(t); + if (!r || r.indexOf(n.type) === -1) + return !1; + var i = this.internalFindSymbol(t, r); + return i === n; + }, e.prototype.findSymbol = function(t, n, r) { + for (var i = this.global.findScope(r); i; ) { + var a = i.getSymbol(t, n); + if (a) + return a; + i = i.parent; + } + return null; + }, e; +}(), ko; +ko = (() => { + var e = { 470: (r) => { + function i(l) { + if (typeof l != "string") + throw new TypeError("Path must be a string. Received " + JSON.stringify(l)); + } + function a(l, h) { + for (var c, d = "", p = 0, f = -1, g = 0, w = 0; w <= l.length; ++w) { + if (w < l.length) + c = l.charCodeAt(w); + else { + if (c === 47) + break; + c = 47; + } + if (c === 47) { + if (!(f === w - 1 || g === 1)) + if (f !== w - 1 && g === 2) { + if (d.length < 2 || p !== 2 || d.charCodeAt(d.length - 1) !== 46 || d.charCodeAt(d.length - 2) !== 46) { + if (d.length > 2) { + var b = d.lastIndexOf("/"); + if (b !== d.length - 1) { + b === -1 ? (d = "", p = 0) : p = (d = d.slice(0, b)).length - 1 - d.lastIndexOf("/"), f = w, g = 0; + continue; + } + } else if (d.length === 2 || d.length === 1) { + d = "", p = 0, f = w, g = 0; continue; } - } else if (n2.length === 2 || n2.length === 1) { - n2 = "", o = 0, i = h, a2 = 0; - continue; } - } - e3 && (n2.length > 0 ? n2 += "/.." : n2 = "..", o = 2); - } else - n2.length > 0 ? n2 += "/" + t3.slice(i + 1, h) : n2 = t3.slice(i + 1, h), o = h - i - 1; - i = h, a2 = 0; + h && (d.length > 0 ? d += "/.." : d = "..", p = 2); + } else + d.length > 0 ? d += "/" + l.slice(f + 1, w) : d = l.slice(f + 1, w), p = w - f - 1; + f = w, g = 0; } else - r3 === 46 && a2 !== -1 ? ++a2 : a2 = -1; + c === 46 && g !== -1 ? ++g : g = -1; } - return n2; + return d; } - var n = { resolve: function() { - for (var t3, n2 = "", o = false, i = arguments.length - 1; i >= -1 && !o; i--) { - var a2; - i >= 0 ? a2 = arguments[i] : (t3 === void 0 && (t3 = process.cwd()), a2 = t3), e2(a2), a2.length !== 0 && (n2 = a2 + "/" + n2, o = a2.charCodeAt(0) === 47); + var o = { resolve: function() { + for (var l, h = "", c = !1, d = arguments.length - 1; d >= -1 && !c; d--) { + var p; + d >= 0 ? p = arguments[d] : (l === void 0 && (l = process.cwd()), p = l), i(p), p.length !== 0 && (h = p + "/" + h, c = p.charCodeAt(0) === 47); } - return n2 = r2(n2, !o), o ? n2.length > 0 ? "/" + n2 : "/" : n2.length > 0 ? n2 : "."; - }, normalize: function(t3) { - if (e2(t3), t3.length === 0) + return h = a(h, !c), c ? h.length > 0 ? "/" + h : "/" : h.length > 0 ? h : "."; + }, normalize: function(l) { + if (i(l), l.length === 0) return "."; - var n2 = t3.charCodeAt(0) === 47, o = t3.charCodeAt(t3.length - 1) === 47; - return (t3 = r2(t3, !n2)).length !== 0 || n2 || (t3 = "."), t3.length > 0 && o && (t3 += "/"), n2 ? "/" + t3 : t3; - }, isAbsolute: function(t3) { - return e2(t3), t3.length > 0 && t3.charCodeAt(0) === 47; + var h = l.charCodeAt(0) === 47, c = l.charCodeAt(l.length - 1) === 47; + return (l = a(l, !h)).length !== 0 || h || (l = "."), l.length > 0 && c && (l += "/"), h ? "/" + l : l; + }, isAbsolute: function(l) { + return i(l), l.length > 0 && l.charCodeAt(0) === 47; }, join: function() { if (arguments.length === 0) return "."; - for (var t3, r3 = 0; r3 < arguments.length; ++r3) { - var o = arguments[r3]; - e2(o), o.length > 0 && (t3 === void 0 ? t3 = o : t3 += "/" + o); + for (var l, h = 0; h < arguments.length; ++h) { + var c = arguments[h]; + i(c), c.length > 0 && (l === void 0 ? l = c : l += "/" + c); } - return t3 === void 0 ? "." : n.normalize(t3); - }, relative: function(t3, r3) { - if (e2(t3), e2(r3), t3 === r3) + return l === void 0 ? "." : o.normalize(l); + }, relative: function(l, h) { + if (i(l), i(h), l === h || (l = o.resolve(l)) === (h = o.resolve(h))) return ""; - if ((t3 = n.resolve(t3)) === (r3 = n.resolve(r3))) - return ""; - for (var o = 1; o < t3.length && t3.charCodeAt(o) === 47; ++o) + for (var c = 1; c < l.length && l.charCodeAt(c) === 47; ++c) ; - for (var i = t3.length, a2 = i - o, h = 1; h < r3.length && r3.charCodeAt(h) === 47; ++h) + for (var d = l.length, p = d - c, f = 1; f < h.length && h.charCodeAt(f) === 47; ++f) ; - for (var s = r3.length - h, c = a2 < s ? a2 : s, f2 = -1, u = 0; u <= c; ++u) { - if (u === c) { - if (s > c) { - if (r3.charCodeAt(h + u) === 47) - return r3.slice(h + u + 1); - if (u === 0) - return r3.slice(h + u); + for (var g = h.length - f, w = p < g ? p : g, b = -1, y = 0; y <= w; ++y) { + if (y === w) { + if (g > w) { + if (h.charCodeAt(f + y) === 47) + return h.slice(f + y + 1); + if (y === 0) + return h.slice(f + y); } else - a2 > c && (t3.charCodeAt(o + u) === 47 ? f2 = u : u === 0 && (f2 = 0)); + p > w && (l.charCodeAt(c + y) === 47 ? b = y : y === 0 && (b = 0)); break; } - var l = t3.charCodeAt(o + u); - if (l !== r3.charCodeAt(h + u)) + var A = l.charCodeAt(c + y); + if (A !== h.charCodeAt(f + y)) break; - l === 47 && (f2 = u); + A === 47 && (b = y); } - var p = ""; - for (u = o + f2 + 1; u <= i; ++u) - u !== i && t3.charCodeAt(u) !== 47 || (p.length === 0 ? p += ".." : p += "/.."); - return p.length > 0 ? p + r3.slice(h + f2) : (h += f2, r3.charCodeAt(h) === 47 && ++h, r3.slice(h)); - }, _makeLong: function(t3) { - return t3; - }, dirname: function(t3) { - if (e2(t3), t3.length === 0) + var C = ""; + for (y = c + b + 1; y <= d; ++y) + y !== d && l.charCodeAt(y) !== 47 || (C.length === 0 ? C += ".." : C += "/.."); + return C.length > 0 ? C + h.slice(f + b) : (f += b, h.charCodeAt(f) === 47 && ++f, h.slice(f)); + }, _makeLong: function(l) { + return l; + }, dirname: function(l) { + if (i(l), l.length === 0) return "."; - for (var r3 = t3.charCodeAt(0), n2 = r3 === 47, o = -1, i = true, a2 = t3.length - 1; a2 >= 1; --a2) - if ((r3 = t3.charCodeAt(a2)) === 47) { - if (!i) { - o = a2; + for (var h = l.charCodeAt(0), c = h === 47, d = -1, p = !0, f = l.length - 1; f >= 1; --f) + if ((h = l.charCodeAt(f)) === 47) { + if (!p) { + d = f; break; } } else - i = false; - return o === -1 ? n2 ? "/" : "." : n2 && o === 1 ? "//" : t3.slice(0, o); - }, basename: function(t3, r3) { - if (r3 !== void 0 && typeof r3 != "string") + p = !1; + return d === -1 ? c ? "/" : "." : c && d === 1 ? "//" : l.slice(0, d); + }, basename: function(l, h) { + if (h !== void 0 && typeof h != "string") throw new TypeError('"ext" argument must be a string'); - e2(t3); - var n2, o = 0, i = -1, a2 = true; - if (r3 !== void 0 && r3.length > 0 && r3.length <= t3.length) { - if (r3.length === t3.length && r3 === t3) + i(l); + var c, d = 0, p = -1, f = !0; + if (h !== void 0 && h.length > 0 && h.length <= l.length) { + if (h.length === l.length && h === l) return ""; - var h = r3.length - 1, s = -1; - for (n2 = t3.length - 1; n2 >= 0; --n2) { - var c = t3.charCodeAt(n2); - if (c === 47) { - if (!a2) { - o = n2 + 1; + var g = h.length - 1, w = -1; + for (c = l.length - 1; c >= 0; --c) { + var b = l.charCodeAt(c); + if (b === 47) { + if (!f) { + d = c + 1; break; } } else - s === -1 && (a2 = false, s = n2 + 1), h >= 0 && (c === r3.charCodeAt(h) ? --h == -1 && (i = n2) : (h = -1, i = s)); + w === -1 && (f = !1, w = c + 1), g >= 0 && (b === h.charCodeAt(g) ? --g == -1 && (p = c) : (g = -1, p = w)); } - return o === i ? i = s : i === -1 && (i = t3.length), t3.slice(o, i); + return d === p ? p = w : p === -1 && (p = l.length), l.slice(d, p); } - for (n2 = t3.length - 1; n2 >= 0; --n2) - if (t3.charCodeAt(n2) === 47) { - if (!a2) { - o = n2 + 1; + for (c = l.length - 1; c >= 0; --c) + if (l.charCodeAt(c) === 47) { + if (!f) { + d = c + 1; break; } } else - i === -1 && (a2 = false, i = n2 + 1); - return i === -1 ? "" : t3.slice(o, i); - }, extname: function(t3) { - e2(t3); - for (var r3 = -1, n2 = 0, o = -1, i = true, a2 = 0, h = t3.length - 1; h >= 0; --h) { - var s = t3.charCodeAt(h); - if (s !== 47) - o === -1 && (i = false, o = h + 1), s === 46 ? r3 === -1 ? r3 = h : a2 !== 1 && (a2 = 1) : r3 !== -1 && (a2 = -1); - else if (!i) { - n2 = h + 1; + p === -1 && (f = !1, p = c + 1); + return p === -1 ? "" : l.slice(d, p); + }, extname: function(l) { + i(l); + for (var h = -1, c = 0, d = -1, p = !0, f = 0, g = l.length - 1; g >= 0; --g) { + var w = l.charCodeAt(g); + if (w !== 47) + d === -1 && (p = !1, d = g + 1), w === 46 ? h === -1 ? h = g : f !== 1 && (f = 1) : h !== -1 && (f = -1); + else if (!p) { + c = g + 1; break; } } - return r3 === -1 || o === -1 || a2 === 0 || a2 === 1 && r3 === o - 1 && r3 === n2 + 1 ? "" : t3.slice(r3, o); - }, format: function(t3) { - if (t3 === null || typeof t3 != "object") - throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t3); - return function(t4, e3) { - var r3 = e3.dir || e3.root, n2 = e3.base || (e3.name || "") + (e3.ext || ""); - return r3 ? r3 === e3.root ? r3 + n2 : r3 + "/" + n2 : n2; - }(0, t3); - }, parse: function(t3) { - e2(t3); - var r3 = { root: "", dir: "", base: "", ext: "", name: "" }; - if (t3.length === 0) - return r3; - var n2, o = t3.charCodeAt(0), i = o === 47; - i ? (r3.root = "/", n2 = 1) : n2 = 0; - for (var a2 = -1, h = 0, s = -1, c = true, f2 = t3.length - 1, u = 0; f2 >= n2; --f2) - if ((o = t3.charCodeAt(f2)) !== 47) - s === -1 && (c = false, s = f2 + 1), o === 46 ? a2 === -1 ? a2 = f2 : u !== 1 && (u = 1) : a2 !== -1 && (u = -1); - else if (!c) { - h = f2 + 1; + return h === -1 || d === -1 || f === 0 || f === 1 && h === d - 1 && h === c + 1 ? "" : l.slice(h, d); + }, format: function(l) { + if (l === null || typeof l != "object") + throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof l); + return function(h, c) { + var d = c.dir || c.root, p = c.base || (c.name || "") + (c.ext || ""); + return d ? d === c.root ? d + p : d + "/" + p : p; + }(0, l); + }, parse: function(l) { + i(l); + var h = { root: "", dir: "", base: "", ext: "", name: "" }; + if (l.length === 0) + return h; + var c, d = l.charCodeAt(0), p = d === 47; + p ? (h.root = "/", c = 1) : c = 0; + for (var f = -1, g = 0, w = -1, b = !0, y = l.length - 1, A = 0; y >= c; --y) + if ((d = l.charCodeAt(y)) !== 47) + w === -1 && (b = !1, w = y + 1), d === 46 ? f === -1 ? f = y : A !== 1 && (A = 1) : f !== -1 && (A = -1); + else if (!b) { + g = y + 1; break; } - return a2 === -1 || s === -1 || u === 0 || u === 1 && a2 === s - 1 && a2 === h + 1 ? s !== -1 && (r3.base = r3.name = h === 0 && i ? t3.slice(1, s) : t3.slice(h, s)) : (h === 0 && i ? (r3.name = t3.slice(1, a2), r3.base = t3.slice(1, s)) : (r3.name = t3.slice(h, a2), r3.base = t3.slice(h, s)), r3.ext = t3.slice(a2, s)), h > 0 ? r3.dir = t3.slice(0, h - 1) : i && (r3.dir = "/"), r3; + return f === -1 || w === -1 || A === 0 || A === 1 && f === w - 1 && f === g + 1 ? w !== -1 && (h.base = h.name = g === 0 && p ? l.slice(1, w) : l.slice(g, w)) : (g === 0 && p ? (h.name = l.slice(1, f), h.base = l.slice(1, w)) : (h.name = l.slice(g, f), h.base = l.slice(g, w)), h.ext = l.slice(f, w)), g > 0 ? h.dir = l.slice(0, g - 1) : p && (h.dir = "/"), h; }, sep: "/", delimiter: ":", win32: null, posix: null }; - n.posix = n, t2.exports = n; - }, 447: (t2, e2, r2) => { - var n; - if (r2.r(e2), r2.d(e2, { URI: () => d, Utils: () => P }), typeof process == "object") - n = process.platform === "win32"; + o.posix = o, r.exports = o; + }, 447: (r, i, a) => { + var o; + if (a.r(i), a.d(i, { URI: () => C, Utils: () => re }), typeof process == "object") + o = process.platform === "win32"; else if (typeof navigator == "object") { - var o = navigator.userAgent; - n = o.indexOf("Windows") >= 0; + var l = navigator.userAgent; + o = l.indexOf("Windows") >= 0; } - var i, a2, h = (i = function(t3, e3) { - return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t4, e4) { - t4.__proto__ = e4; - } || function(t4, e4) { - for (var r3 in e4) - Object.prototype.hasOwnProperty.call(e4, r3) && (t4[r3] = e4[r3]); - })(t3, e3); - }, function(t3, e3) { - if (typeof e3 != "function" && e3 !== null) - throw new TypeError("Class extends value " + String(e3) + " is not a constructor or null"); - function r3() { - this.constructor = t3; + var h, c, d = (h = function(D, S) { + return (h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, M) { + E.__proto__ = M; + } || function(E, M) { + for (var $ in M) + Object.prototype.hasOwnProperty.call(M, $) && (E[$] = M[$]); + })(D, S); + }, function(D, S) { + if (typeof S != "function" && S !== null) + throw new TypeError("Class extends value " + String(S) + " is not a constructor or null"); + function E() { + this.constructor = D; } - i(t3, e3), t3.prototype = e3 === null ? Object.create(e3) : (r3.prototype = e3.prototype, new r3()); - }), s = /^\w[\w\d+.-]*$/, c = /^\//, f2 = /^\/\//; - function u(t3, e3) { - if (!t3.scheme && e3) - throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(t3.authority, '", path: "').concat(t3.path, '", query: "').concat(t3.query, '", fragment: "').concat(t3.fragment, '"}')); - if (t3.scheme && !s.test(t3.scheme)) + h(D, S), D.prototype = S === null ? Object.create(S) : (E.prototype = S.prototype, new E()); + }), p = /^\w[\w\d+.-]*$/, f = /^\//, g = /^\/\//; + function w(D, S) { + if (!D.scheme && S) + throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(D.authority, '", path: "').concat(D.path, '", query: "').concat(D.query, '", fragment: "').concat(D.fragment, '"}')); + if (D.scheme && !p.test(D.scheme)) throw new Error("[UriError]: Scheme contains illegal characters."); - if (t3.path) { - if (t3.authority) { - if (!c.test(t3.path)) + if (D.path) { + if (D.authority) { + if (!f.test(D.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 (f2.test(t3.path)) + } else if (g.test(D.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); } } - var l = "", p = "/", g = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, d = function() { - function t3(t4, e3, r3, n2, o2, i2) { - i2 === void 0 && (i2 = false), typeof t4 == "object" ? (this.scheme = t4.scheme || l, this.authority = t4.authority || l, this.path = t4.path || l, this.query = t4.query || l, this.fragment = t4.fragment || l) : (this.scheme = function(t5, e4) { - return t5 || e4 ? t5 : "file"; - }(t4, i2), this.authority = e3 || l, this.path = function(t5, e4) { - switch (t5) { + var b = "", y = "/", A = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, C = function() { + function D(S, E, M, $, H, Y) { + Y === void 0 && (Y = !1), typeof S == "object" ? (this.scheme = S.scheme || b, this.authority = S.authority || b, this.path = S.path || b, this.query = S.query || b, this.fragment = S.fragment || b) : (this.scheme = function(Te, ge) { + return Te || ge ? Te : "file"; + }(S, Y), this.authority = E || b, this.path = function(Te, ge) { + switch (Te) { case "https": case "http": case "file": - e4 ? e4[0] !== p && (e4 = p + e4) : e4 = p; + ge ? ge[0] !== y && (ge = y + ge) : ge = y; } - return e4; - }(this.scheme, r3 || l), this.query = n2 || l, this.fragment = o2 || l, u(this, i2)); + return ge; + }(this.scheme, M || b), this.query = $ || b, this.fragment = H || b, w(this, Y)); } - return t3.isUri = function(e3) { - return e3 instanceof t3 || !!e3 && typeof e3.authority == "string" && typeof e3.fragment == "string" && typeof e3.path == "string" && typeof e3.query == "string" && typeof e3.scheme == "string" && typeof e3.fsPath == "string" && typeof e3.with == "function" && typeof e3.toString == "function"; - }, Object.defineProperty(t3.prototype, "fsPath", { get: function() { - return A2(this, false); - }, enumerable: false, configurable: true }), t3.prototype.with = function(t4) { - if (!t4) + return D.isUri = function(S) { + return S instanceof D || !!S && typeof S.authority == "string" && typeof S.fragment == "string" && typeof S.path == "string" && typeof S.query == "string" && typeof S.scheme == "string" && typeof S.fsPath == "string" && typeof S.with == "function" && typeof S.toString == "function"; + }, Object.defineProperty(D.prototype, "fsPath", { get: function() { + return z(this, !1); + }, enumerable: !1, configurable: !0 }), D.prototype.with = function(S) { + if (!S) return this; - var e3 = t4.scheme, r3 = t4.authority, n2 = t4.path, o2 = t4.query, i2 = t4.fragment; - return e3 === void 0 ? e3 = this.scheme : e3 === null && (e3 = l), r3 === void 0 ? r3 = this.authority : r3 === null && (r3 = l), n2 === void 0 ? n2 = this.path : n2 === null && (n2 = l), o2 === void 0 ? o2 = this.query : o2 === null && (o2 = l), i2 === void 0 ? i2 = this.fragment : i2 === null && (i2 = l), e3 === this.scheme && r3 === this.authority && n2 === this.path && o2 === this.query && i2 === this.fragment ? this : new y(e3, r3, n2, o2, i2); - }, t3.parse = function(t4, e3) { - e3 === void 0 && (e3 = false); - var r3 = g.exec(t4); - return r3 ? new y(r3[2] || l, O(r3[4] || l), O(r3[5] || l), O(r3[7] || l), O(r3[9] || l), e3) : new y(l, l, l, l, l); - }, t3.file = function(t4) { - var e3 = l; - if (n && (t4 = t4.replace(/\\/g, p)), t4[0] === p && t4[1] === p) { - var r3 = t4.indexOf(p, 2); - r3 === -1 ? (e3 = t4.substring(2), t4 = p) : (e3 = t4.substring(2, r3), t4 = t4.substring(r3) || p); + var E = S.scheme, M = S.authority, $ = S.path, H = S.query, Y = S.fragment; + return E === void 0 ? E = this.scheme : E === null && (E = b), M === void 0 ? M = this.authority : M === null && (M = b), $ === void 0 ? $ = this.path : $ === null && ($ = b), H === void 0 ? H = this.query : H === null && (H = b), Y === void 0 ? Y = this.fragment : Y === null && (Y = b), E === this.scheme && M === this.authority && $ === this.path && H === this.query && Y === this.fragment ? this : new k(E, M, $, H, Y); + }, D.parse = function(S, E) { + E === void 0 && (E = !1); + var M = A.exec(S); + return M ? new k(M[2] || b, O(M[4] || b), O(M[5] || b), O(M[7] || b), O(M[9] || b), E) : new k(b, b, b, b, b); + }, D.file = function(S) { + var E = b; + if (o && (S = S.replace(/\\/g, y)), S[0] === y && S[1] === y) { + var M = S.indexOf(y, 2); + M === -1 ? (E = S.substring(2), S = y) : (E = S.substring(2, M), S = S.substring(M) || y); } - return new y("file", e3, t4, l, l); - }, t3.from = function(t4) { - var e3 = new y(t4.scheme, t4.authority, t4.path, t4.query, t4.fragment); - return u(e3, true), e3; - }, t3.prototype.toString = function(t4) { - return t4 === void 0 && (t4 = false), w(this, t4); - }, t3.prototype.toJSON = function() { + return new k("file", E, S, b, b); + }, D.from = function(S) { + var E = new k(S.scheme, S.authority, S.path, S.query, S.fragment); + return w(E, !0), E; + }, D.prototype.toString = function(S) { + return S === void 0 && (S = !1), T(this, S); + }, D.prototype.toJSON = function() { return this; - }, t3.revive = function(e3) { - if (e3) { - if (e3 instanceof t3) - return e3; - var r3 = new y(e3); - return r3._formatted = e3.external, r3._fsPath = e3._sep === v ? e3.fsPath : null, r3; + }, D.revive = function(S) { + if (S) { + if (S instanceof D) + return S; + var E = new k(S); + return E._formatted = S.external, E._fsPath = S._sep === R ? S.fsPath : null, E; } - return e3; - }, t3; - }(), v = n ? 1 : void 0, y = function(t3) { - function e3() { - var e4 = t3 !== null && t3.apply(this, arguments) || this; - return e4._formatted = null, e4._fsPath = null, e4; + return S; + }, D; + }(), R = o ? 1 : void 0, k = function(D) { + function S() { + var E = D !== null && D.apply(this, arguments) || this; + return E._formatted = null, E._fsPath = null, E; } - return h(e3, t3), Object.defineProperty(e3.prototype, "fsPath", { get: function() { - return this._fsPath || (this._fsPath = A2(this, false)), this._fsPath; - }, enumerable: false, configurable: true }), e3.prototype.toString = function(t4) { - return t4 === void 0 && (t4 = false), t4 ? w(this, true) : (this._formatted || (this._formatted = w(this, false)), this._formatted); - }, e3.prototype.toJSON = function() { - var t4 = { $mid: 1 }; - return this._fsPath && (t4.fsPath = this._fsPath, t4._sep = v), this._formatted && (t4.external = this._formatted), this.path && (t4.path = this.path), this.scheme && (t4.scheme = this.scheme), this.authority && (t4.authority = this.authority), this.query && (t4.query = this.query), this.fragment && (t4.fragment = this.fragment), t4; - }, e3; - }(d), m = ((a2 = {})[58] = "%3A", a2[47] = "%2F", a2[63] = "%3F", a2[35] = "%23", a2[91] = "%5B", a2[93] = "%5D", a2[64] = "%40", a2[33] = "%21", a2[36] = "%24", a2[38] = "%26", a2[39] = "%27", a2[40] = "%28", a2[41] = "%29", a2[42] = "%2A", a2[43] = "%2B", a2[44] = "%2C", a2[59] = "%3B", a2[61] = "%3D", a2[32] = "%20", a2); - function b(t3, e3) { - for (var r3 = void 0, n2 = -1, o2 = 0; o2 < t3.length; o2++) { - var i2 = t3.charCodeAt(o2); - if (i2 >= 97 && i2 <= 122 || i2 >= 65 && i2 <= 90 || i2 >= 48 && i2 <= 57 || i2 === 45 || i2 === 46 || i2 === 95 || i2 === 126 || e3 && i2 === 47) - n2 !== -1 && (r3 += encodeURIComponent(t3.substring(n2, o2)), n2 = -1), r3 !== void 0 && (r3 += t3.charAt(o2)); + return d(S, D), Object.defineProperty(S.prototype, "fsPath", { get: function() { + return this._fsPath || (this._fsPath = z(this, !1)), this._fsPath; + }, enumerable: !1, configurable: !0 }), S.prototype.toString = function(E) { + return E === void 0 && (E = !1), E ? T(this, !0) : (this._formatted || (this._formatted = T(this, !1)), this._formatted); + }, S.prototype.toJSON = function() { + var E = { $mid: 1 }; + return this._fsPath && (E.fsPath = this._fsPath, E._sep = R), 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; + }, S; + }(C), F = ((c = {})[58] = "%3A", c[47] = "%2F", c[63] = "%3F", c[35] = "%23", c[91] = "%5B", c[93] = "%5D", c[64] = "%40", c[33] = "%21", c[36] = "%24", c[38] = "%26", c[39] = "%27", c[40] = "%28", c[41] = "%29", c[42] = "%2A", c[43] = "%2B", c[44] = "%2C", c[59] = "%3B", c[61] = "%3D", c[32] = "%20", c); + function P(D, S) { + for (var E = void 0, M = -1, $ = 0; $ < D.length; $++) { + var H = D.charCodeAt($); + if (H >= 97 && H <= 122 || H >= 65 && H <= 90 || H >= 48 && H <= 57 || H === 45 || H === 46 || H === 95 || H === 126 || S && H === 47) + M !== -1 && (E += encodeURIComponent(D.substring(M, $)), M = -1), E !== void 0 && (E += D.charAt($)); else { - r3 === void 0 && (r3 = t3.substr(0, o2)); - var a3 = m[i2]; - a3 !== void 0 ? (n2 !== -1 && (r3 += encodeURIComponent(t3.substring(n2, o2)), n2 = -1), r3 += a3) : n2 === -1 && (n2 = o2); + E === void 0 && (E = D.substr(0, $)); + var Y = F[H]; + Y !== void 0 ? (M !== -1 && (E += encodeURIComponent(D.substring(M, $)), M = -1), E += Y) : M === -1 && (M = $); } } - return n2 !== -1 && (r3 += encodeURIComponent(t3.substring(n2))), r3 !== void 0 ? r3 : t3; + return M !== -1 && (E += encodeURIComponent(D.substring(M))), E !== void 0 ? E : D; } - function C(t3) { - for (var e3 = void 0, r3 = 0; r3 < t3.length; r3++) { - var n2 = t3.charCodeAt(r3); - n2 === 35 || n2 === 63 ? (e3 === void 0 && (e3 = t3.substr(0, r3)), e3 += m[n2]) : e3 !== void 0 && (e3 += t3[r3]); + function N(D) { + for (var S = void 0, E = 0; E < D.length; E++) { + var M = D.charCodeAt(E); + M === 35 || M === 63 ? (S === void 0 && (S = D.substr(0, E)), S += F[M]) : S !== void 0 && (S += D[E]); } - return e3 !== void 0 ? e3 : t3; + return S !== void 0 ? S : D; } - function A2(t3, e3) { - var r3; - return r3 = t3.authority && t3.path.length > 1 && t3.scheme === "file" ? "//".concat(t3.authority).concat(t3.path) : t3.path.charCodeAt(0) === 47 && (t3.path.charCodeAt(1) >= 65 && t3.path.charCodeAt(1) <= 90 || t3.path.charCodeAt(1) >= 97 && t3.path.charCodeAt(1) <= 122) && t3.path.charCodeAt(2) === 58 ? e3 ? t3.path.substr(1) : t3.path[1].toLowerCase() + t3.path.substr(2) : t3.path, n && (r3 = r3.replace(/\//g, "\\")), r3; + function z(D, S) { + var E; + return E = D.authority && D.path.length > 1 && D.scheme === "file" ? "//".concat(D.authority).concat(D.path) : D.path.charCodeAt(0) === 47 && (D.path.charCodeAt(1) >= 65 && D.path.charCodeAt(1) <= 90 || D.path.charCodeAt(1) >= 97 && D.path.charCodeAt(1) <= 122) && D.path.charCodeAt(2) === 58 ? S ? D.path.substr(1) : D.path[1].toLowerCase() + D.path.substr(2) : D.path, o && (E = E.replace(/\//g, "\\")), E; } - function w(t3, e3) { - var r3 = e3 ? C : b, n2 = "", o2 = t3.scheme, i2 = t3.authority, a3 = t3.path, h2 = t3.query, s2 = t3.fragment; - if (o2 && (n2 += o2, n2 += ":"), (i2 || o2 === "file") && (n2 += p, n2 += p), i2) { - var c2 = i2.indexOf("@"); - if (c2 !== -1) { - var f3 = i2.substr(0, c2); - i2 = i2.substr(c2 + 1), (c2 = f3.indexOf(":")) === -1 ? n2 += r3(f3, false) : (n2 += r3(f3.substr(0, c2), false), n2 += ":", n2 += r3(f3.substr(c2 + 1), false)), n2 += "@"; + function T(D, S) { + var E = S ? N : P, M = "", $ = D.scheme, H = D.authority, Y = D.path, Te = D.query, ge = D.fragment; + if ($ && (M += $, M += ":"), (H || $ === "file") && (M += y, M += y), H) { + var Se = H.indexOf("@"); + if (Se !== -1) { + var rt = H.substr(0, Se); + H = H.substr(Se + 1), (Se = rt.indexOf(":")) === -1 ? M += E(rt, !1) : (M += E(rt.substr(0, Se), !1), M += ":", M += E(rt.substr(Se + 1), !1)), M += "@"; } - (c2 = (i2 = i2.toLowerCase()).indexOf(":")) === -1 ? n2 += r3(i2, false) : (n2 += r3(i2.substr(0, c2), false), n2 += i2.substr(c2)); + (Se = (H = H.toLowerCase()).indexOf(":")) === -1 ? M += E(H, !1) : (M += E(H.substr(0, Se), !1), M += H.substr(Se)); } - if (a3) { - if (a3.length >= 3 && a3.charCodeAt(0) === 47 && a3.charCodeAt(2) === 58) - (u2 = a3.charCodeAt(1)) >= 65 && u2 <= 90 && (a3 = "/".concat(String.fromCharCode(u2 + 32), ":").concat(a3.substr(3))); - else if (a3.length >= 2 && a3.charCodeAt(1) === 58) { - var u2; - (u2 = a3.charCodeAt(0)) >= 65 && u2 <= 90 && (a3 = "".concat(String.fromCharCode(u2 + 32), ":").concat(a3.substr(2))); + if (Y) { + if (Y.length >= 3 && Y.charCodeAt(0) === 47 && Y.charCodeAt(2) === 58) + (Be = Y.charCodeAt(1)) >= 65 && Be <= 90 && (Y = "/".concat(String.fromCharCode(Be + 32), ":").concat(Y.substr(3))); + else if (Y.length >= 2 && Y.charCodeAt(1) === 58) { + var Be; + (Be = Y.charCodeAt(0)) >= 65 && Be <= 90 && (Y = "".concat(String.fromCharCode(Be + 32), ":").concat(Y.substr(2))); } - n2 += r3(a3, true); + M += E(Y, !0); } - return h2 && (n2 += "?", n2 += r3(h2, false)), s2 && (n2 += "#", n2 += e3 ? s2 : b(s2, false)), n2; + return Te && (M += "?", M += E(Te, !1)), ge && (M += "#", M += S ? ge : P(ge, !1)), M; } - function x(t3) { + function j(D) { try { - return decodeURIComponent(t3); - } catch (e3) { - return t3.length > 3 ? t3.substr(0, 3) + x(t3.substr(3)) : t3; + return decodeURIComponent(D); + } catch { + return D.length > 3 ? D.substr(0, 3) + j(D.substr(3)) : D; } } - var _ = /(%[0-9A-Za-z][0-9A-Za-z])+/g; - function O(t3) { - return t3.match(_) ? t3.replace(_, function(t4) { - return x(t4); - }) : t3; + var U = /(%[0-9A-Za-z][0-9A-Za-z])+/g; + function O(D) { + return D.match(U) ? D.replace(U, function(S) { + return j(S); + }) : D; } - var P, j = r2(470), U = function(t3, e3, r3) { - if (r3 || arguments.length === 2) - for (var n2, o2 = 0, i2 = e3.length; o2 < i2; o2++) - !n2 && o2 in e3 || (n2 || (n2 = Array.prototype.slice.call(e3, 0, o2)), n2[o2] = e3[o2]); - return t3.concat(n2 || Array.prototype.slice.call(e3)); - }, I = j.posix || j; - !function(t3) { - t3.joinPath = function(t4) { - for (var e3 = [], r3 = 1; r3 < arguments.length; r3++) - e3[r3 - 1] = arguments[r3]; - return t4.with({ path: I.join.apply(I, U([t4.path], e3, false)) }); - }, t3.resolvePath = function(t4) { - for (var e3 = [], r3 = 1; r3 < arguments.length; r3++) - e3[r3 - 1] = arguments[r3]; - var n2 = t4.path || "/"; - return t4.with({ path: I.resolve.apply(I, U([n2], e3, false)) }); - }, t3.dirname = function(t4) { - var e3 = I.dirname(t4.path); - return e3.length === 1 && e3.charCodeAt(0) === 46 ? t4 : t4.with({ path: e3 }); - }, t3.basename = function(t4) { - return I.basename(t4.path); - }, t3.extname = function(t4) { - return I.extname(t4.path); + var re, de = a(470), Me = function(D, S, E) { + if (E || arguments.length === 2) + for (var M, $ = 0, H = S.length; $ < H; $++) + !M && $ in S || (M || (M = Array.prototype.slice.call(S, 0, $)), M[$] = S[$]); + return D.concat(M || Array.prototype.slice.call(S)); + }, Ne = de.posix || de; + (function(D) { + D.joinPath = function(S) { + for (var E = [], M = 1; M < arguments.length; M++) + E[M - 1] = arguments[M]; + return S.with({ path: Ne.join.apply(Ne, Me([S.path], E, !1)) }); + }, D.resolvePath = function(S) { + for (var E = [], M = 1; M < arguments.length; M++) + E[M - 1] = arguments[M]; + var $ = S.path || "/"; + return S.with({ path: Ne.resolve.apply(Ne, Me([$], E, !1)) }); + }, D.dirname = function(S) { + var E = Ne.dirname(S.path); + return E.length === 1 && E.charCodeAt(0) === 46 ? S : S.with({ path: E }); + }, D.basename = function(S) { + return Ne.basename(S.path); + }, D.extname = function(S) { + return Ne.extname(S.path); }; - }(P || (P = {})); - } }, e = {}; - function r(n) { - if (e[n]) - return e[n].exports; - var o = e[n] = { exports: {} }; - return t[n](o, o.exports, r), o.exports; + })(re || (re = {})); + } }, t = {}; + function n(r) { + if (t[r]) + return t[r].exports; + var i = t[r] = { exports: {} }; + return e[r](i, i.exports, n), i.exports; } - return r.d = (t2, e2) => { - for (var n in e2) - r.o(e2, n) && !r.o(t2, n) && Object.defineProperty(t2, n, { enumerable: true, get: e2[n] }); - }, r.o = (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r.r = (t2) => { - typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); - }, r(447); + return n.d = (r, i) => { + for (var a in i) + n.o(i, a) && !n.o(r, a) && Object.defineProperty(r, a, { enumerable: !0, get: i[a] }); + }, n.o = (r, i) => Object.prototype.hasOwnProperty.call(r, i), n.r = (r) => { + typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(r, "__esModule", { value: !0 }); + }, n(447); })(); -var { URI, Utils } = LIB; -var __spreadArray2 = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); +var { URI: hi, Utils: Br } = ko, Ih = function(e, t, n) { + if (n || arguments.length === 2) + for (var r = 0, i = t.length, a; r < i; r++) + (a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]); + return e.concat(a || Array.prototype.slice.call(t)); }; -function dirname(uriString) { - return Utils.dirname(URI.parse(uriString)).toString(); +function Zn(e) { + return Br.dirname(hi.parse(e)).toString(); } -function joinPath(uriString) { - var paths = []; - for (var _i = 1; _i < arguments.length; _i++) { - paths[_i - 1] = arguments[_i]; - } - return Utils.joinPath.apply(Utils, __spreadArray2([URI.parse(uriString)], paths, false)).toString(); +function jr(e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; + return Br.joinPath.apply(Br, Ih([hi.parse(e)], t, !1)).toString(); } -var __awaiter = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); +var Ds = function(e, t, n, r) { + function i(a) { + return a instanceof n ? a : new n(function(o) { + o(a); }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { + return new (n || (n = Promise))(function(a, o) { + function l(d) { try { - step(generator.next(value)); - } catch (e) { - reject(e); + c(r.next(d)); + } catch (p) { + o(p); } } - function rejected(value) { + function h(d) { try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + c(r.throw(d)); + } catch (p) { + o(p); } } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + function c(d) { + d.done ? a(d.value) : i(d.value).then(l, h); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + c((r = r.apply(e, t || [])).next()); }); -}; -var __generator = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f2, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { +}, Es = function(e, t) { + var n = { label: 0, sent: function() { + if (a[0] & 1) + throw a[1]; + return a[1]; + }, trys: [], ops: [] }, r, i, a, o; + return o = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() { return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); + }), o; + function l(c) { + return function(d) { + return h([c, d]); }; } - function step(op) { - if (f2) + function h(c) { + if (r) throw new TypeError("Generator is already executing."); - while (_) + for (; n; ) try { - if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) - return t; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { + if (r = 1, i && (a = c[0] & 2 ? i.return : c[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, c[1])).done) + return a; + switch (i = 0, a && (c = [c[0] & 2, a.value]), c[0]) { case 0: case 1: - t = op; + a = c; break; case 4: - _.label++; - return { value: op[1], done: false }; + return n.label++, { value: c[1], done: !1 }; case 5: - _.label++; - y = op[1]; - op = [0]; + n.label++, i = c[1], c = [0]; continue; case 7: - op = _.ops.pop(); - _.trys.pop(); + c = n.ops.pop(), n.trys.pop(); continue; default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; + if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (c[0] === 6 || c[0] === 2)) { + n = 0; continue; } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; + if (c[0] === 3 && (!a || c[1] > a[0] && c[1] < a[3])) { + n.label = c[1]; break; } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; + if (c[0] === 6 && n.label < a[1]) { + n.label = a[1], a = c; break; } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); + if (a && n.label < a[2]) { + n.label = a[2], n.ops.push(c); break; } - if (t[2]) - _.ops.pop(); - _.trys.pop(); + a[2] && n.ops.pop(), n.trys.pop(); continue; } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; + c = t.call(e, n); + } catch (d) { + c = [6, d], i = 0; } finally { - f2 = t = 0; + r = a = 0; } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; + if (c[0] & 5) + throw c[1]; + return { value: c[0] ? c[1] : void 0, done: !0 }; } -}; -var PathCompletionParticipant = function() { - function PathCompletionParticipant2(readDirectory) { - this.readDirectory = readDirectory; - this.literalCompletions = []; - this.importCompletions = []; +}, Lh = function() { + function e(t) { + this.readDirectory = t, this.literalCompletions = [], this.importCompletions = []; } - PathCompletionParticipant2.prototype.onCssURILiteralValue = function(context) { - this.literalCompletions.push(context); - }; - PathCompletionParticipant2.prototype.onCssImportPath = function(context) { - this.importCompletions.push(context); - }; - PathCompletionParticipant2.prototype.computeCompletions = function(document, documentContext) { - return __awaiter(this, void 0, void 0, function() { - var result, _i, _a2, literalCompletion, uriValue, fullValue, items, _b, items_1, item, _c, _d, importCompletion, pathValue, fullValue, suggestions, _e, suggestions_1, item; - return __generator(this, function(_f2) { - switch (_f2.label) { + return e.prototype.onCssURILiteralValue = function(t) { + this.literalCompletions.push(t); + }, e.prototype.onCssImportPath = function(t) { + this.importCompletions.push(t); + }, e.prototype.computeCompletions = function(t, n) { + return Ds(this, void 0, void 0, function() { + var r, i, a, o, l, b, h, c, d, R, p, f, g, w, b, y, A, C, R; + return Es(this, function(k) { + switch (k.label) { case 0: - result = { items: [], isIncomplete: false }; - _i = 0, _a2 = this.literalCompletions; - _f2.label = 1; + r = { items: [], isIncomplete: !1 }, i = 0, a = this.literalCompletions, k.label = 1; case 1: - if (!(_i < _a2.length)) - return [3, 5]; - literalCompletion = _a2[_i]; - uriValue = literalCompletion.uriValue; - fullValue = stripQuotes(uriValue); - if (!(fullValue === "." || fullValue === "..")) - return [3, 2]; - result.isIncomplete = true; - return [3, 4]; + return i < a.length ? (o = a[i], l = o.uriValue, b = Qn(l), b === "." || b === ".." ? (r.isIncomplete = !0, [3, 4]) : [3, 2]) : [3, 5]; case 2: - return [4, this.providePathSuggestions(uriValue, literalCompletion.position, literalCompletion.range, document, documentContext)]; + return [4, this.providePathSuggestions(l, o.position, o.range, t, n)]; case 3: - items = _f2.sent(); - for (_b = 0, items_1 = items; _b < items_1.length; _b++) { - item = items_1[_b]; - result.items.push(item); - } - _f2.label = 4; + for (h = k.sent(), c = 0, d = h; c < d.length; c++) + R = d[c], r.items.push(R); + k.label = 4; case 4: - _i++; - return [3, 1]; + return i++, [3, 1]; case 5: - _c = 0, _d = this.importCompletions; - _f2.label = 6; + p = 0, f = this.importCompletions, k.label = 6; case 6: - if (!(_c < _d.length)) - return [3, 10]; - importCompletion = _d[_c]; - pathValue = importCompletion.pathValue; - fullValue = stripQuotes(pathValue); - if (!(fullValue === "." || fullValue === "..")) - return [3, 7]; - result.isIncomplete = true; - return [3, 9]; + return p < f.length ? (g = f[p], w = g.pathValue, b = Qn(w), b === "." || b === ".." ? (r.isIncomplete = !0, [3, 9]) : [3, 7]) : [3, 10]; case 7: - return [4, this.providePathSuggestions(pathValue, importCompletion.position, importCompletion.range, document, documentContext)]; + return [4, this.providePathSuggestions(w, g.position, g.range, t, n)]; case 8: - suggestions = _f2.sent(); - if (document.languageId === "scss") { - suggestions.forEach(function(s) { - if (startsWith(s.label, "_") && endsWith(s.label, ".scss")) { - if (s.textEdit) { - s.textEdit.newText = s.label.slice(1, -5); - } else { - s.label = s.label.slice(1, -5); - } - } - }); - } - for (_e = 0, suggestions_1 = suggestions; _e < suggestions_1.length; _e++) { - item = suggestions_1[_e]; - result.items.push(item); - } - _f2.label = 9; + for (y = k.sent(), t.languageId === "scss" && y.forEach(function(F) { + oe(F.label, "_") && oo(F.label, ".scss") && (F.textEdit ? F.textEdit.newText = F.label.slice(1, -5) : F.label = F.label.slice(1, -5)); + }), A = 0, C = y; A < C.length; A++) + R = C[A], r.items.push(R); + k.label = 9; case 9: - _c++; - return [3, 6]; + return p++, [3, 6]; case 10: - return [2, result]; + return [2, r]; } }); }); - }; - PathCompletionParticipant2.prototype.providePathSuggestions = function(pathValue, position, range, document, documentContext) { - return __awaiter(this, void 0, void 0, function() { - var fullValue, isValueQuoted, valueBeforeCursor, currentDocUri, fullValueRange, replaceRange, valueBeforeLastSlash, parentDir, result, infos, _i, infos_1, _a2, name, type; - return __generator(this, function(_b) { - switch (_b.label) { + }, e.prototype.providePathSuggestions = function(t, n, r, i, a) { + return Ds(this, void 0, void 0, function() { + var o, l, h, c, d, p, f, g, w, b, y, A, C, R, k; + return Es(this, function(F) { + switch (F.label) { case 0: - fullValue = stripQuotes(pathValue); - isValueQuoted = startsWith(pathValue, "'") || startsWith(pathValue, '"'); - valueBeforeCursor = isValueQuoted ? fullValue.slice(0, position.character - (range.start.character + 1)) : fullValue.slice(0, position.character - range.start.character); - currentDocUri = document.uri; - fullValueRange = isValueQuoted ? shiftRange(range, 1, -1) : range; - replaceRange = pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange); - valueBeforeLastSlash = valueBeforeCursor.substring(0, valueBeforeCursor.lastIndexOf("/") + 1); - parentDir = documentContext.resolveReference(valueBeforeLastSlash || ".", currentDocUri); - if (!parentDir) + if (o = Qn(t), l = oe(t, "'") || oe(t, '"'), h = l ? o.slice(0, n.character - (r.start.character + 1)) : o.slice(0, n.character - r.start.character), c = i.uri, d = l ? Vh(r, 1, -1) : r, p = Wh(h, o, d), f = h.substring(0, h.lastIndexOf("/") + 1), g = a.resolveReference(f || ".", c), !g) return [3, 4]; - _b.label = 1; + F.label = 1; case 1: - _b.trys.push([1, 3, , 4]); - result = []; - return [4, this.readDirectory(parentDir)]; + return F.trys.push([1, 3, , 4]), w = [], [4, this.readDirectory(g)]; case 2: - infos = _b.sent(); - for (_i = 0, infos_1 = infos; _i < infos_1.length; _i++) { - _a2 = infos_1[_i], name = _a2[0], type = _a2[1]; - if (name.charCodeAt(0) !== CharCode_dot && (type === FileType.Directory || joinPath(parentDir, name) !== currentDocUri)) { - result.push(createCompletionItem(name, type === FileType.Directory, replaceRange)); - } - } - return [2, result]; + for (b = F.sent(), y = 0, A = b; y < A.length; y++) + C = A[y], R = C[0], k = C[1], R.charCodeAt(0) !== Th && (k === Kt.Directory || jr(g, R) !== c) && w.push(Oh(R, k === Kt.Directory, p)); + return [2, w]; case 3: - _b.sent(); - return [3, 4]; + return F.sent(), [3, 4]; case 4: return [2, []]; } }); }); - }; - return PathCompletionParticipant2; -}(); -var CharCode_dot = ".".charCodeAt(0); -function stripQuotes(fullValue) { - if (startsWith(fullValue, "'") || startsWith(fullValue, '"')) { - return fullValue.slice(1, -1); - } else { - return fullValue; - } + }, e; +}(), Th = ".".charCodeAt(0); +function Qn(e) { + return oe(e, "'") || oe(e, '"') ? e.slice(1, -1) : e; } -function pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange) { - var replaceRange; - var lastIndexOfSlash = valueBeforeCursor.lastIndexOf("/"); - if (lastIndexOfSlash === -1) { - replaceRange = fullValueRange; - } else { - var valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1); - var startPos = shiftPosition(fullValueRange.end, -valueAfterLastSlash.length); - var whitespaceIndex = valueAfterLastSlash.indexOf(" "); - var endPos = void 0; - if (whitespaceIndex !== -1) { - endPos = shiftPosition(startPos, whitespaceIndex); - } else { - endPos = fullValueRange.end; +function Wh(e, t, n) { + var r, i = e.lastIndexOf("/"); + if (i === -1) + r = n; + else { + var a = t.slice(i + 1), o = Pn(n.end, -a.length), l = a.indexOf(" "), h = void 0; + l !== -1 ? h = Pn(o, l) : h = n.end, r = Q.create(o, h); + } + return r; +} +function Oh(e, t, n) { + return t ? (e = e + "/", { + label: mn(e), + kind: V.Folder, + textEdit: B.replace(n, mn(e)), + command: { + title: "Suggest", + command: "editor.action.triggerSuggest" } - replaceRange = Range.create(startPos, endPos); - } - return replaceRange; + }) : { + label: mn(e), + kind: V.File, + textEdit: B.replace(n, mn(e)) + }; } -function createCompletionItem(name, isDir, replaceRange) { - if (isDir) { - name = name + "/"; - return { - label: escapePath(name), - kind: CompletionItemKind.Folder, - textEdit: TextEdit.replace(replaceRange, escapePath(name)), - command: { - title: "Suggest", - command: "editor.action.triggerSuggest" - } - }; - } else { - return { - label: escapePath(name), - kind: CompletionItemKind.File, - textEdit: TextEdit.replace(replaceRange, escapePath(name)) - }; - } +function mn(e) { + return e.replace(/(\s|\(|\)|,|"|')/g, "\\$1"); } -function escapePath(p) { - return p.replace(/(\s|\(|\)|,|"|')/g, "\\$1"); +function Pn(e, t) { + return Fe.create(e.line, e.character + t); } -function shiftPosition(pos, offset) { - return Position.create(pos.line, pos.character + offset); +function Vh(e, t, n) { + var r = Pn(e.start, t), i = Pn(e.end, n); + return Q.create(r, i); } -function shiftRange(range, startOffset, endOffset) { - var start = shiftPosition(range.start, startOffset); - var end = shiftPosition(range.end, endOffset); - return Range.create(start, end); -} -var __awaiter2 = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); +var Uh = function(e, t, n, r) { + function i(a) { + return a instanceof n ? a : new n(function(o) { + o(a); }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { + return new (n || (n = Promise))(function(a, o) { + function l(d) { try { - step(generator.next(value)); - } catch (e) { - reject(e); + c(r.next(d)); + } catch (p) { + o(p); } } - function rejected(value) { + function h(d) { try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + c(r.throw(d)); + } catch (p) { + o(p); } } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + function c(d) { + d.done ? a(d.value) : i(d.value).then(l, h); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + c((r = r.apply(e, t || [])).next()); }); -}; -var __generator2 = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f2, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { +}, Bh = function(e, t) { + var n = { label: 0, sent: function() { + if (a[0] & 1) + throw a[1]; + return a[1]; + }, trys: [], ops: [] }, r, i, a, o; + return o = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() { return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); + }), o; + function l(c) { + return function(d) { + return h([c, d]); }; } - function step(op) { - if (f2) + function h(c) { + if (r) throw new TypeError("Generator is already executing."); - while (_) + for (; n; ) try { - if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) - return t; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { + if (r = 1, i && (a = c[0] & 2 ? i.return : c[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, c[1])).done) + return a; + switch (i = 0, a && (c = [c[0] & 2, a.value]), c[0]) { case 0: case 1: - t = op; + a = c; break; case 4: - _.label++; - return { value: op[1], done: false }; + return n.label++, { value: c[1], done: !1 }; case 5: - _.label++; - y = op[1]; - op = [0]; + n.label++, i = c[1], c = [0]; continue; case 7: - op = _.ops.pop(); - _.trys.pop(); + c = n.ops.pop(), n.trys.pop(); continue; default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; + if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (c[0] === 6 || c[0] === 2)) { + n = 0; continue; } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; + if (c[0] === 3 && (!a || c[1] > a[0] && c[1] < a[3])) { + n.label = c[1]; break; } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; + if (c[0] === 6 && n.label < a[1]) { + n.label = a[1], a = c; break; } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); + if (a && n.label < a[2]) { + n.label = a[2], n.ops.push(c); break; } - if (t[2]) - _.ops.pop(); - _.trys.pop(); + a[2] && n.ops.pop(), n.trys.pop(); continue; } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; + c = t.call(e, n); + } catch (d) { + c = [6, d], i = 0; } finally { - f2 = t = 0; + r = a = 0; } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; + if (c[0] & 5) + throw c[1]; + return { value: c[0] ? c[1] : void 0, done: !0 }; } -}; -var localize4 = loadMessageBundle(); -var SnippetFormat = InsertTextFormat.Snippet; -var retriggerCommand = { +}, jh = Le(), je = ke.Snippet, Rs = { title: "Suggest", command: "editor.action.triggerSuggest" -}; -var SortTexts; -(function(SortTexts2) { - SortTexts2["Enums"] = " "; - SortTexts2["Normal"] = "d"; - SortTexts2["VendorPrefixed"] = "x"; - SortTexts2["Term"] = "y"; - SortTexts2["Variable"] = "z"; -})(SortTexts || (SortTexts = {})); -var CSSCompletion = function() { - function CSSCompletion2(variablePrefix, lsOptions, cssDataManager) { - if (variablePrefix === void 0) { - variablePrefix = null; - } - this.variablePrefix = variablePrefix; - this.lsOptions = lsOptions; - this.cssDataManager = cssDataManager; - this.completionParticipants = []; +}, We; +(function(e) { + e.Enums = " ", e.Normal = "d", e.VendorPrefixed = "x", e.Term = "y", e.Variable = "z"; +})(We || (We = {})); +var di = function() { + function e(t, n, r) { + t === void 0 && (t = null), this.variablePrefix = t, this.lsOptions = n, this.cssDataManager = r, this.completionParticipants = []; } - CSSCompletion2.prototype.configure = function(settings) { - this.defaultSettings = settings; - }; - CSSCompletion2.prototype.getSymbolContext = function() { - if (!this.symbolContext) { - this.symbolContext = new Symbols(this.styleSheet); - } - return this.symbolContext; - }; - CSSCompletion2.prototype.setCompletionParticipants = function(registeredCompletionParticipants) { - this.completionParticipants = registeredCompletionParticipants || []; - }; - CSSCompletion2.prototype.doComplete2 = function(document, position, styleSheet, documentContext, completionSettings) { - if (completionSettings === void 0) { - completionSettings = this.defaultSettings; - } - return __awaiter2(this, void 0, void 0, function() { - var participant, contributedParticipants, result, pathCompletionResult; - return __generator2(this, function(_a2) { - switch (_a2.label) { + return e.prototype.configure = function(t) { + this.defaultSettings = t; + }, e.prototype.getSymbolContext = function() { + return this.symbolContext || (this.symbolContext = new Ur(this.styleSheet)), this.symbolContext; + }, e.prototype.setCompletionParticipants = function(t) { + this.completionParticipants = t || []; + }, e.prototype.doComplete2 = function(t, n, r, i, a) { + return a === void 0 && (a = this.defaultSettings), Uh(this, void 0, void 0, function() { + var o, l, h, c; + return Bh(this, function(d) { + switch (d.label) { case 0: - if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) { - return [2, this.doComplete(document, position, styleSheet, completionSettings)]; - } - participant = new PathCompletionParticipant(this.lsOptions.fileSystemProvider.readDirectory); - contributedParticipants = this.completionParticipants; - this.completionParticipants = [participant].concat(contributedParticipants); - result = this.doComplete(document, position, styleSheet, completionSettings); - _a2.label = 1; + if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) + return [2, this.doComplete(t, n, r, a)]; + o = new Lh(this.lsOptions.fileSystemProvider.readDirectory), l = this.completionParticipants, this.completionParticipants = [o].concat(l), h = this.doComplete(t, n, r, a), d.label = 1; case 1: - _a2.trys.push([1, , 3, 4]); - return [4, participant.computeCompletions(document, documentContext)]; + return d.trys.push([1, , 3, 4]), [4, o.computeCompletions(t, i)]; case 2: - pathCompletionResult = _a2.sent(); - return [2, { - isIncomplete: result.isIncomplete || pathCompletionResult.isIncomplete, - items: pathCompletionResult.items.concat(result.items) + return c = d.sent(), [2, { + isIncomplete: h.isIncomplete || c.isIncomplete, + items: c.items.concat(h.items) }]; case 3: - this.completionParticipants = contributedParticipants; - return [7]; + return this.completionParticipants = l, [7]; case 4: return [2]; } }); }); - }; - CSSCompletion2.prototype.doComplete = function(document, position, styleSheet, documentSettings) { - this.offset = document.offsetAt(position); - this.position = position; - this.currentWord = getCurrentWord(document, this.offset); - this.defaultReplaceRange = Range.create(Position.create(this.position.line, this.position.character - this.currentWord.length), this.position); - this.textDocument = document; - this.styleSheet = styleSheet; - this.documentSettings = documentSettings; + }, e.prototype.doComplete = function(t, n, r, i) { + this.offset = t.offsetAt(n), this.position = n, this.currentWord = Gh(t, this.offset), this.defaultReplaceRange = Q.create(Fe.create(this.position.line, this.position.character - this.currentWord.length), this.position), this.textDocument = t, this.styleSheet = r, this.documentSettings = i; try { - var result = { isIncomplete: false, items: [] }; - this.nodePath = getNodePath(this.styleSheet, this.offset); - for (var i = this.nodePath.length - 1; i >= 0; i--) { - var node = this.nodePath[i]; - if (node instanceof Property) { - this.getCompletionsForDeclarationProperty(node.getParent(), result); - } else if (node instanceof Expression) { - if (node.parent instanceof Interpolation) { - this.getVariableProposals(null, result); - } else { - this.getCompletionsForExpression(node, result); - } - } else if (node instanceof SimpleSelector) { - var parentRef = node.findAParent(NodeType.ExtendsReference, NodeType.Ruleset); - if (parentRef) { - if (parentRef.type === NodeType.ExtendsReference) { - this.getCompletionsForExtendsReference(parentRef, node, result); - } else { - var parentRuleSet = parentRef; - this.getCompletionsForSelector(parentRuleSet, parentRuleSet && parentRuleSet.isNested(), result); + var a = { isIncomplete: !1, items: [] }; + this.nodePath = ei(this.styleSheet, this.offset); + for (var o = this.nodePath.length - 1; o >= 0; o--) { + var l = this.nodePath[o]; + if (l instanceof ri) + this.getCompletionsForDeclarationProperty(l.getParent(), a); + else if (l instanceof mo) + l.parent instanceof zr ? this.getVariableProposals(null, a) : this.getCompletionsForExpression(l, a); + else if (l instanceof kt) { + var h = l.findAParent(m.ExtendsReference, m.Ruleset); + if (h) + if (h.type === m.ExtendsReference) + this.getCompletionsForExtendsReference(h, l, a); + else { + var c = h; + this.getCompletionsForSelector(c, c && c.isNested(), a); } - } - } else if (node instanceof FunctionArgument) { - this.getCompletionsForFunctionArgument(node, node.getParent(), result); - } else if (node instanceof Declarations) { - this.getCompletionsForDeclarations(node, result); - } else if (node instanceof VariableDeclaration) { - this.getCompletionsForVariableDeclaration(node, result); - } else if (node instanceof RuleSet) { - this.getCompletionsForRuleSet(node, result); - } else if (node instanceof Interpolation) { - this.getCompletionsForInterpolation(node, result); - } else if (node instanceof FunctionDeclaration) { - this.getCompletionsForFunctionDeclaration(node, result); - } else if (node instanceof MixinReference) { - this.getCompletionsForMixinReference(node, result); - } else if (node instanceof Function) { - this.getCompletionsForFunctionArgument(null, node, result); - } else if (node instanceof Supports) { - this.getCompletionsForSupports(node, result); - } else if (node instanceof SupportsCondition) { - this.getCompletionsForSupportsCondition(node, result); - } else if (node instanceof ExtendsReference) { - this.getCompletionsForExtendsReference(node, null, result); - } else if (node.type === NodeType.URILiteral) { - this.getCompletionForUriLiteralValue(node, result); - } else if (node.parent === null) { - this.getCompletionForTopLevel(result); - } else if (node.type === NodeType.StringLiteral && this.isImportPathParent(node.parent.type)) { - this.getCompletionForImportPath(node, result); - } else { + } else if (l instanceof Dt) + this.getCompletionsForFunctionArgument(l, l.getParent(), a); + else if (l instanceof ti) + this.getCompletionsForDeclarations(l, a); + else if (l instanceof Vn) + this.getCompletionsForVariableDeclaration(l, a); + else if (l instanceof Ct) + this.getCompletionsForRuleSet(l, a); + else if (l instanceof zr) + this.getCompletionsForInterpolation(l, a); + else if (l instanceof kn) + this.getCompletionsForFunctionDeclaration(l, a); + else if (l instanceof Fn) + this.getCompletionsForMixinReference(l, a); + else if (l instanceof nn) + this.getCompletionsForFunctionArgument(null, l, a); + else if (l instanceof Ar) + this.getCompletionsForSupports(l, a); + else if (l instanceof Ut) + this.getCompletionsForSupportsCondition(l, a); + else if (l instanceof qt) + this.getCompletionsForExtendsReference(l, null, a); + else if (l.type === m.URILiteral) + this.getCompletionForUriLiteralValue(l, a); + else if (l.parent === null) + this.getCompletionForTopLevel(a); + else if (l.type === m.StringLiteral && this.isImportPathParent(l.parent.type)) + this.getCompletionForImportPath(l, a); + else continue; - } - if (result.items.length > 0 || this.offset > node.offset) { - return this.finalize(result); - } + if (a.items.length > 0 || this.offset > l.offset) + return this.finalize(a); } - this.getCompletionsForStylesheet(result); - if (result.items.length === 0) { - if (this.variablePrefix && this.currentWord.indexOf(this.variablePrefix) === 0) { - this.getVariableProposals(null, result); - } - } - return this.finalize(result); + return this.getCompletionsForStylesheet(a), a.items.length === 0 && this.variablePrefix && this.currentWord.indexOf(this.variablePrefix) === 0 && this.getVariableProposals(null, a), this.finalize(a); } finally { - this.position = null; - this.currentWord = null; - this.textDocument = null; - this.styleSheet = null; - this.symbolContext = null; - this.defaultReplaceRange = null; - this.nodePath = null; + this.position = null, this.currentWord = null, this.textDocument = null, this.styleSheet = null, this.symbolContext = null, this.defaultReplaceRange = null, this.nodePath = null; } - }; - CSSCompletion2.prototype.isImportPathParent = function(type) { - return type === NodeType.Import; - }; - CSSCompletion2.prototype.finalize = function(result) { - return result; - }; - CSSCompletion2.prototype.findInNodePath = function() { - var types = []; - for (var _i = 0; _i < arguments.length; _i++) { - types[_i] = arguments[_i]; - } - for (var i = this.nodePath.length - 1; i >= 0; i--) { - var node = this.nodePath[i]; - if (types.indexOf(node.type) !== -1) { - return node; - } + }, e.prototype.isImportPathParent = function(t) { + return t === m.Import; + }, e.prototype.finalize = function(t) { + return t; + }, e.prototype.findInNodePath = function() { + for (var t = [], n = 0; n < arguments.length; n++) + t[n] = arguments[n]; + for (var r = this.nodePath.length - 1; r >= 0; r--) { + var i = this.nodePath[r]; + if (t.indexOf(i.type) !== -1) + return i; } return null; - }; - CSSCompletion2.prototype.getCompletionsForDeclarationProperty = function(declaration, result) { - return this.getPropertyProposals(declaration, result); - }; - CSSCompletion2.prototype.getPropertyProposals = function(declaration, result) { - var _this = this; - var triggerPropertyValueCompletion = this.isTriggerPropertyValueCompletionEnabled; - var completePropertyWithSemicolon = this.isCompletePropertyWithSemicolonEnabled; - var properties = this.cssDataManager.getProperties(); - properties.forEach(function(entry) { - var range; - var insertText; - var retrigger = false; - if (declaration) { - range = _this.getCompletionRange(declaration.getProperty()); - insertText = entry.name; - if (!isDefined(declaration.colonPosition)) { - insertText += ": "; - retrigger = true; - } - } else { - range = _this.getCompletionRange(null); - insertText = entry.name + ": "; - retrigger = true; - } - if (!declaration && completePropertyWithSemicolon) { - insertText += "$0;"; - } - if (declaration && !declaration.semicolonPosition) { - if (completePropertyWithSemicolon && _this.offset >= _this.textDocument.offsetAt(range.end)) { - insertText += "$0;"; - } - } - var item = { - label: entry.name, - documentation: getEntryDescription(entry, _this.doesSupportMarkdown()), - tags: isDeprecated(entry) ? [CompletionItemTag.Deprecated] : [], - textEdit: TextEdit.replace(range, insertText), - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Property + }, e.prototype.getCompletionsForDeclarationProperty = function(t, n) { + return this.getPropertyProposals(t, n); + }, e.prototype.getPropertyProposals = function(t, n) { + var r = this, i = this.isTriggerPropertyValueCompletionEnabled, a = this.isCompletePropertyWithSemicolonEnabled, o = this.cssDataManager.getProperties(); + return o.forEach(function(l) { + var h, c, d = !1; + t ? (h = r.getCompletionRange(t.getProperty()), c = l.name, Ee(t.colonPosition) || (c += ": ", d = !0)) : (h = r.getCompletionRange(null), c = l.name + ": ", d = !0), !t && a && (c += "$0;"), t && !t.semicolonPosition && a && r.offset >= r.textDocument.offsetAt(h.end) && (c += "$0;"); + var p = { + label: l.name, + documentation: et(l, r.doesSupportMarkdown()), + tags: It(l) ? [ot.Deprecated] : [], + textEdit: B.replace(h, c), + insertTextFormat: ke.Snippet, + kind: V.Property }; - if (!entry.restrictions) { - retrigger = false; - } - if (triggerPropertyValueCompletion && retrigger) { - item.command = retriggerCommand; - } - var relevance = typeof entry.relevance === "number" ? Math.min(Math.max(entry.relevance, 0), 99) : 50; - var sortTextSuffix = (255 - relevance).toString(16); - var sortTextPrefix = startsWith(entry.name, "-") ? SortTexts.VendorPrefixed : SortTexts.Normal; - item.sortText = sortTextPrefix + "_" + sortTextSuffix; - result.items.push(item); - }); - this.completionParticipants.forEach(function(participant) { - if (participant.onCssProperty) { - participant.onCssProperty({ - propertyName: _this.currentWord, - range: _this.defaultReplaceRange - }); - } - }); - return result; - }; - Object.defineProperty(CSSCompletion2.prototype, "isTriggerPropertyValueCompletionEnabled", { + l.restrictions || (d = !1), i && d && (p.command = Rs); + var f = typeof l.relevance == "number" ? Math.min(Math.max(l.relevance, 0), 99) : 50, g = (255 - f).toString(16), w = oe(l.name, "-") ? We.VendorPrefixed : We.Normal; + p.sortText = w + "_" + g, n.items.push(p); + }), this.completionParticipants.forEach(function(l) { + l.onCssProperty && l.onCssProperty({ + propertyName: r.currentWord, + range: r.defaultReplaceRange + }); + }), n; + }, Object.defineProperty(e.prototype, "isTriggerPropertyValueCompletionEnabled", { get: function() { - var _a2, _b; - return (_b = (_a2 = this.documentSettings) === null || _a2 === void 0 ? void 0 : _a2.triggerPropertyValueCompletion) !== null && _b !== void 0 ? _b : true; + var t, n; + return (n = (t = this.documentSettings) === null || t === void 0 ? void 0 : t.triggerPropertyValueCompletion) !== null && n !== void 0 ? n : !0; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CSSCompletion2.prototype, "isCompletePropertyWithSemicolonEnabled", { + enumerable: !1, + configurable: !0 + }), Object.defineProperty(e.prototype, "isCompletePropertyWithSemicolonEnabled", { get: function() { - var _a2, _b; - return (_b = (_a2 = this.documentSettings) === null || _a2 === void 0 ? void 0 : _a2.completePropertyWithSemicolon) !== null && _b !== void 0 ? _b : true; + var t, n; + return (n = (t = this.documentSettings) === null || t === void 0 ? void 0 : t.completePropertyWithSemicolon) !== null && n !== void 0 ? n : !0; }, - enumerable: false, - configurable: true - }); - CSSCompletion2.prototype.getCompletionsForDeclarationValue = function(node, result) { - var _this = this; - var propertyName = node.getFullPropertyName(); - var entry = this.cssDataManager.getProperty(propertyName); - var existingNode = node.getValue() || null; - while (existingNode && existingNode.hasChildren()) { - existingNode = existingNode.findChildAtOffset(this.offset, false); - } - this.completionParticipants.forEach(function(participant) { - if (participant.onCssPropertyValue) { - participant.onCssPropertyValue({ - propertyName, - propertyValue: _this.currentWord, - range: _this.getCompletionRange(existingNode) - }); - } - }); - if (entry) { - if (entry.restrictions) { - for (var _i = 0, _a2 = entry.restrictions; _i < _a2.length; _i++) { - var restriction = _a2[_i]; - switch (restriction) { + enumerable: !1, + configurable: !0 + }), e.prototype.getCompletionsForDeclarationValue = function(t, n) { + for (var r = this, i = t.getFullPropertyName(), a = this.cssDataManager.getProperty(i), o = t.getValue() || null; o && o.hasChildren(); ) + o = o.findChildAtOffset(this.offset, !1); + if (this.completionParticipants.forEach(function(w) { + w.onCssPropertyValue && w.onCssPropertyValue({ + propertyName: i, + propertyValue: r.currentWord, + range: r.getCompletionRange(o) + }); + }), a) { + if (a.restrictions) + for (var l = 0, h = a.restrictions; l < h.length; l++) { + var c = h[l]; + switch (c) { case "color": - this.getColorProposals(entry, existingNode, result); + this.getColorProposals(a, o, n); break; case "position": - this.getPositionProposals(entry, existingNode, result); + this.getPositionProposals(a, o, n); break; case "repeat": - this.getRepeatStyleProposals(entry, existingNode, result); + this.getRepeatStyleProposals(a, o, n); break; case "line-style": - this.getLineStyleProposals(entry, existingNode, result); + this.getLineStyleProposals(a, o, n); break; case "line-width": - this.getLineWidthProposals(entry, existingNode, result); + this.getLineWidthProposals(a, o, n); break; case "geometry-box": - this.getGeometryBoxProposals(entry, existingNode, result); + this.getGeometryBoxProposals(a, o, n); break; case "box": - this.getBoxProposals(entry, existingNode, result); + this.getBoxProposals(a, o, n); break; case "image": - this.getImageProposals(entry, existingNode, result); + this.getImageProposals(a, o, n); break; case "timing-function": - this.getTimingFunctionProposals(entry, existingNode, result); + this.getTimingFunctionProposals(a, o, n); break; case "shape": - this.getBasicShapeProposals(entry, existingNode, result); + this.getBasicShapeProposals(a, o, n); break; } } - } - this.getValueEnumProposals(entry, existingNode, result); - this.getCSSWideKeywordProposals(entry, existingNode, result); - this.getUnitProposals(entry, existingNode, result); - } else { - var existingValues = collectValues(this.styleSheet, node); - for (var _b = 0, _c = existingValues.getEntries(); _b < _c.length; _b++) { - var existingValue = _c[_b]; - result.items.push({ - label: existingValue, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), existingValue), - kind: CompletionItemKind.Value + this.getValueEnumProposals(a, o, n), this.getCSSWideKeywordProposals(a, o, n), this.getUnitProposals(a, o, n); + } else + for (var d = qh(this.styleSheet, t), p = 0, f = d.getEntries(); p < f.length; p++) { + var g = f[p]; + n.items.push({ + label: g, + textEdit: B.replace(this.getCompletionRange(o), g), + kind: V.Value }); } - } - this.getVariableProposals(existingNode, result); - this.getTermProposals(entry, existingNode, result); - return result; - }; - CSSCompletion2.prototype.getValueEnumProposals = function(entry, existingNode, result) { - if (entry.values) { - for (var _i = 0, _a2 = entry.values; _i < _a2.length; _i++) { - var value = _a2[_i]; - var insertString = value.name; - var insertTextFormat = void 0; - if (endsWith(insertString, ")")) { - var from = insertString.lastIndexOf("("); - if (from !== -1) { - insertString = insertString.substr(0, from) + "($1)"; - insertTextFormat = SnippetFormat; - } + return this.getVariableProposals(o, n), this.getTermProposals(a, o, n), n; + }, e.prototype.getValueEnumProposals = function(t, n, r) { + if (t.values) + for (var i = 0, a = t.values; i < a.length; i++) { + var o = a[i], l = o.name, h = void 0; + if (oo(l, ")")) { + var c = l.lastIndexOf("("); + c !== -1 && (l = l.substr(0, c) + "($1)", h = je); } - var sortText = SortTexts.Enums; - if (startsWith(value.name, "-")) { - sortText += SortTexts.VendorPrefixed; - } - var item = { - label: value.name, - documentation: getEntryDescription(value, this.doesSupportMarkdown()), - tags: isDeprecated(entry) ? [CompletionItemTag.Deprecated] : [], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertString), - sortText, - kind: CompletionItemKind.Value, - insertTextFormat + var d = We.Enums; + oe(o.name, "-") && (d += We.VendorPrefixed); + var p = { + label: o.name, + documentation: et(o, this.doesSupportMarkdown()), + tags: It(t) ? [ot.Deprecated] : [], + textEdit: B.replace(this.getCompletionRange(n), l), + sortText: d, + kind: V.Value, + insertTextFormat: h }; - result.items.push(item); + r.items.push(p); } - } - return result; - }; - CSSCompletion2.prototype.getCSSWideKeywordProposals = function(entry, existingNode, result) { - for (var keywords in cssWideKeywords) { - result.items.push({ - label: keywords, - documentation: cssWideKeywords[keywords], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), keywords), - kind: CompletionItemKind.Value + return r; + }, e.prototype.getCSSWideKeywordProposals = function(t, n, r) { + for (var i in xs) + r.items.push({ + label: i, + documentation: xs[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Value + }); + for (var a in Ss) { + var o = yt(a); + r.items.push({ + label: a, + documentation: Ss[a], + textEdit: B.replace(this.getCompletionRange(n), o), + kind: V.Function, + insertTextFormat: je, + command: oe(a, "var") ? Rs : void 0 }); } - for (var func in cssWideFunctions) { - var insertText = moveCursorInsideParenthesis(func); - result.items.push({ - label: func, - documentation: cssWideFunctions[func], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - kind: CompletionItemKind.Function, - insertTextFormat: SnippetFormat, - command: startsWith(func, "var") ? retriggerCommand : void 0 - }); - } - return result; - }; - CSSCompletion2.prototype.getCompletionsForInterpolation = function(node, result) { - if (this.offset >= node.offset + 2) { - this.getVariableProposals(null, result); - } - return result; - }; - CSSCompletion2.prototype.getVariableProposals = function(existingNode, result) { - var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Variable); - for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) { - var symbol = symbols_1[_i]; - var insertText = startsWith(symbol.name, "--") ? "var(".concat(symbol.name, ")") : symbol.name; - var completionItem = { - label: symbol.name, - documentation: symbol.value ? getLimitedString(symbol.value) : symbol.value, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - kind: CompletionItemKind.Variable, - sortText: SortTexts.Variable + return r; + }, e.prototype.getCompletionsForInterpolation = function(t, n) { + return this.offset >= t.offset + 2 && this.getVariableProposals(null, n), n; + }, e.prototype.getVariableProposals = function(t, n) { + for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, G.Variable), i = 0, a = r; i < a.length; i++) { + var o = a[i], l = oe(o.name, "--") ? "var(".concat(o.name, ")") : o.name, h = { + label: o.name, + documentation: o.value ? Pa(o.value) : o.value, + textEdit: B.replace(this.getCompletionRange(t), l), + kind: V.Variable, + sortText: We.Variable }; - if (typeof completionItem.documentation === "string" && isColorString(completionItem.documentation)) { - completionItem.kind = CompletionItemKind.Color; + if (typeof h.documentation == "string" && As(h.documentation) && (h.kind = V.Color), o.node.type === m.FunctionParameter) { + var c = o.node.getParent(); + c.type === m.MixinDeclaration && (h.detail = jh("completion.argument", "argument from '{0}'", c.getName())); } - if (symbol.node.type === NodeType.FunctionParameter) { - var mixinNode = symbol.node.getParent(); - if (mixinNode.type === NodeType.MixinDeclaration) { - completionItem.detail = localize4("completion.argument", "argument from '{0}'", mixinNode.getName()); - } - } - result.items.push(completionItem); + n.items.push(h); } - return result; - }; - CSSCompletion2.prototype.getVariableProposalsForCSSVarFunction = function(result) { - var allReferencedVariables = new Set$1(); - this.styleSheet.acceptVisitor(new VariableCollector(allReferencedVariables, this.offset)); - var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Variable); - for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { - var symbol = symbols_2[_i]; - if (startsWith(symbol.name, "--")) { - var completionItem = { - label: symbol.name, - documentation: symbol.value ? getLimitedString(symbol.value) : symbol.value, - textEdit: TextEdit.replace(this.getCompletionRange(null), symbol.name), - kind: CompletionItemKind.Variable + return n; + }, e.prototype.getVariableProposalsForCSSVarFunction = function(t) { + var n = new qr(); + this.styleSheet.acceptVisitor(new Hh(n, this.offset)); + for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, G.Variable), i = 0, a = r; i < a.length; i++) { + var o = a[i]; + if (oe(o.name, "--")) { + var l = { + label: o.name, + documentation: o.value ? Pa(o.value) : o.value, + textEdit: B.replace(this.getCompletionRange(null), o.name), + kind: V.Variable }; - if (typeof completionItem.documentation === "string" && isColorString(completionItem.documentation)) { - completionItem.kind = CompletionItemKind.Color; - } - result.items.push(completionItem); + typeof l.documentation == "string" && As(l.documentation) && (l.kind = V.Color), t.items.push(l); } - allReferencedVariables.remove(symbol.name); + n.remove(o.name); } - for (var _a2 = 0, _b = allReferencedVariables.getEntries(); _a2 < _b.length; _a2++) { - var name = _b[_a2]; - if (startsWith(name, "--")) { - var completionItem = { - label: name, - textEdit: TextEdit.replace(this.getCompletionRange(null), name), - kind: CompletionItemKind.Variable + for (var h = 0, c = n.getEntries(); h < c.length; h++) { + var d = c[h]; + if (oe(d, "--")) { + var l = { + label: d, + textEdit: B.replace(this.getCompletionRange(null), d), + kind: V.Variable }; - result.items.push(completionItem); + t.items.push(l); } } - return result; - }; - CSSCompletion2.prototype.getUnitProposals = function(entry, existingNode, result) { - var currentWord = "0"; + return t; + }, e.prototype.getUnitProposals = function(t, n, r) { + var i = "0"; if (this.currentWord.length > 0) { - var numMatch = this.currentWord.match(/^-?\d[\.\d+]*/); - if (numMatch) { - currentWord = numMatch[0]; - result.isIncomplete = currentWord.length === this.currentWord.length; - } - } else if (this.currentWord.length === 0) { - result.isIncomplete = true; - } - if (existingNode && existingNode.parent && existingNode.parent.type === NodeType.Term) { - existingNode = existingNode.getParent(); - } - if (entry.restrictions) { - for (var _i = 0, _a2 = entry.restrictions; _i < _a2.length; _i++) { - var restriction = _a2[_i]; - var units2 = units[restriction]; - if (units2) { - for (var _b = 0, units_1 = units2; _b < units_1.length; _b++) { - var unit = units_1[_b]; - var insertText = currentWord + unit; - result.items.push({ - label: insertText, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - kind: CompletionItemKind.Unit + var a = this.currentWord.match(/^-?\d[\.\d+]*/); + a && (i = a[0], r.isIncomplete = i.length === this.currentWord.length); + } else + this.currentWord.length === 0 && (r.isIncomplete = !0); + if (n && n.parent && n.parent.type === m.Term && (n = n.getParent()), t.restrictions) + for (var o = 0, l = t.restrictions; o < l.length; o++) { + var h = l[o], c = xo[h]; + if (c) + for (var d = 0, p = c; d < p.length; d++) { + var f = p[d], g = i + f; + r.items.push({ + label: g, + textEdit: B.replace(this.getCompletionRange(n), g), + kind: V.Unit }); } - } - } - } - return result; - }; - CSSCompletion2.prototype.getCompletionRange = function(existingNode) { - if (existingNode && existingNode.offset <= this.offset && this.offset <= existingNode.end) { - var end = existingNode.end !== -1 ? this.textDocument.positionAt(existingNode.end) : this.position; - var start = this.textDocument.positionAt(existingNode.offset); - if (start.line === end.line) { - return Range.create(start, end); } + return r; + }, e.prototype.getCompletionRange = function(t) { + if (t && t.offset <= this.offset && this.offset <= t.end) { + var n = t.end !== -1 ? this.textDocument.positionAt(t.end) : this.position, r = this.textDocument.positionAt(t.offset); + if (r.line === n.line) + return Q.create(r, n); } return this.defaultReplaceRange; - }; - CSSCompletion2.prototype.getColorProposals = function(entry, existingNode, result) { - for (var color in colors) { - result.items.push({ - label: color, - documentation: colors[color], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), color), - kind: CompletionItemKind.Color + }, e.prototype.getColorProposals = function(t, n, r) { + for (var i in Nn) + r.items.push({ + label: i, + documentation: Nn[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Color + }); + for (var i in ps) + r.items.push({ + label: i, + documentation: ps[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Value + }); + var a = new qr(); + this.styleSheet.acceptVisitor(new $h(a, this.offset)); + for (var o = 0, l = a.getEntries(); o < l.length; o++) { + var i = l[o]; + r.items.push({ + label: i, + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Color }); } - for (var color in colorKeywords) { - result.items.push({ - label: color, - documentation: colorKeywords[color], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), color), - kind: CompletionItemKind.Value + for (var h = function(g) { + var w = 1, b = function(A, C) { + return "${" + w++ + ":" + C + "}"; + }, y = g.func.replace(/\[?\$(\w+)\]?/g, b); + r.items.push({ + label: g.func.substr(0, g.func.indexOf("(")), + detail: g.func, + documentation: g.desc, + textEdit: B.replace(c.getCompletionRange(n), y), + insertTextFormat: je, + kind: V.Function + }); + }, c = this, d = 0, p = vh; d < p.length; d++) { + var f = p[d]; + h(f); + } + return r; + }, e.prototype.getPositionProposals = function(t, n, r) { + for (var i in gs) + r.items.push({ + label: i, + documentation: gs[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Value + }); + return r; + }, e.prototype.getRepeatStyleProposals = function(t, n, r) { + for (var i in bs) + r.items.push({ + label: i, + documentation: bs[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Value + }); + return r; + }, e.prototype.getLineStyleProposals = function(t, n, r) { + for (var i in vs) + r.items.push({ + label: i, + documentation: vs[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Value + }); + return r; + }, e.prototype.getLineWidthProposals = function(t, n, r) { + for (var i = 0, a = Dh; i < a.length; i++) { + var o = a[i]; + r.items.push({ + label: o, + textEdit: B.replace(this.getCompletionRange(n), o), + kind: V.Value }); } - var colorValues = new Set$1(); - this.styleSheet.acceptVisitor(new ColorValueCollector(colorValues, this.offset)); - for (var _i = 0, _a2 = colorValues.getEntries(); _i < _a2.length; _i++) { - var color = _a2[_i]; - result.items.push({ - label: color, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), color), - kind: CompletionItemKind.Color + return r; + }, e.prototype.getGeometryBoxProposals = function(t, n, r) { + for (var i in ws) + r.items.push({ + label: i, + documentation: ws[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Value + }); + return r; + }, e.prototype.getBoxProposals = function(t, n, r) { + for (var i in ys) + r.items.push({ + label: i, + documentation: ys[i], + textEdit: B.replace(this.getCompletionRange(n), i), + kind: V.Value + }); + return r; + }, e.prototype.getImageProposals = function(t, n, r) { + for (var i in Cs) { + var a = yt(i); + r.items.push({ + label: i, + documentation: Cs[i], + textEdit: B.replace(this.getCompletionRange(n), a), + kind: V.Function, + insertTextFormat: i !== a ? je : void 0 }); } - var _loop_1 = function(p2) { - var tabStop = 1; - var replaceFunction = function(_match, p1) { - return "${" + tabStop++ + ":" + p1 + "}"; + return r; + }, e.prototype.getTimingFunctionProposals = function(t, n, r) { + for (var i in ks) { + var a = yt(i); + r.items.push({ + label: i, + documentation: ks[i], + textEdit: B.replace(this.getCompletionRange(n), a), + kind: V.Function, + insertTextFormat: i !== a ? je : void 0 + }); + } + return r; + }, e.prototype.getBasicShapeProposals = function(t, n, r) { + for (var i in Fs) { + var a = yt(i); + r.items.push({ + label: i, + documentation: Fs[i], + textEdit: B.replace(this.getCompletionRange(n), a), + kind: V.Function, + insertTextFormat: i !== a ? je : void 0 + }); + } + return r; + }, e.prototype.getCompletionsForStylesheet = function(t) { + var n = this.styleSheet.findFirstChildBeforeOffset(this.offset); + return n ? n instanceof Ct ? this.getCompletionsForRuleSet(n, t) : n instanceof Ar ? this.getCompletionsForSupports(n, t) : t : this.getCompletionForTopLevel(t); + }, e.prototype.getCompletionForTopLevel = function(t) { + var n = this; + return this.cssDataManager.getAtDirectives().forEach(function(r) { + t.items.push({ + label: r.name, + textEdit: B.replace(n.getCompletionRange(null), r.name), + documentation: et(r, n.doesSupportMarkdown()), + tags: It(r) ? [ot.Deprecated] : [], + kind: V.Keyword + }); + }), this.getCompletionsForSelector(null, !1, t), t; + }, e.prototype.getCompletionsForRuleSet = function(t, n) { + var r = t.getDeclarations(), i = r && r.endsWith("}") && this.offset >= r.end; + if (i) + return this.getCompletionForTopLevel(n); + var a = !r || this.offset <= r.offset; + return a ? this.getCompletionsForSelector(t, t.isNested(), n) : this.getCompletionsForDeclarations(t.getDeclarations(), n); + }, e.prototype.getCompletionsForSelector = function(t, n, r) { + var i = this, a = this.findInNodePath(m.PseudoSelector, m.IdentifierSelector, m.ClassSelector, m.ElementNameSelector); + !a && 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 = Q.create(Fe.create(this.position.line, this.position.character - this.currentWord.length), this.position)); + var o = this.cssDataManager.getPseudoClasses(); + o.forEach(function(y) { + var A = yt(y.name), C = { + label: y.name, + textEdit: B.replace(i.getCompletionRange(a), A), + documentation: et(y, i.doesSupportMarkdown()), + tags: It(y) ? [ot.Deprecated] : [], + kind: V.Function, + insertTextFormat: y.name !== A ? je : void 0 }; - var insertText = p2.func.replace(/\[?\$(\w+)\]?/g, replaceFunction); - result.items.push({ - label: p2.func.substr(0, p2.func.indexOf("(")), - detail: p2.func, - documentation: p2.desc, - textEdit: TextEdit.replace(this_1.getCompletionRange(existingNode), insertText), - insertTextFormat: SnippetFormat, - kind: CompletionItemKind.Function - }); - }; - var this_1 = this; - for (var _b = 0, _c = colorFunctions; _b < _c.length; _b++) { - var p = _c[_b]; - _loop_1(p); - } - return result; - }; - CSSCompletion2.prototype.getPositionProposals = function(entry, existingNode, result) { - for (var position in positionKeywords) { - result.items.push({ - label: position, - documentation: positionKeywords[position], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), position), - kind: CompletionItemKind.Value - }); - } - return result; - }; - CSSCompletion2.prototype.getRepeatStyleProposals = function(entry, existingNode, result) { - for (var repeat in repeatStyleKeywords) { - result.items.push({ - label: repeat, - documentation: repeatStyleKeywords[repeat], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), repeat), - kind: CompletionItemKind.Value - }); - } - return result; - }; - CSSCompletion2.prototype.getLineStyleProposals = function(entry, existingNode, result) { - for (var lineStyle in lineStyleKeywords) { - result.items.push({ - label: lineStyle, - documentation: lineStyleKeywords[lineStyle], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), lineStyle), - kind: CompletionItemKind.Value - }); - } - return result; - }; - CSSCompletion2.prototype.getLineWidthProposals = function(entry, existingNode, result) { - for (var _i = 0, _a2 = lineWidthKeywords; _i < _a2.length; _i++) { - var lineWidth = _a2[_i]; - result.items.push({ - label: lineWidth, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), lineWidth), - kind: CompletionItemKind.Value - }); - } - return result; - }; - CSSCompletion2.prototype.getGeometryBoxProposals = function(entry, existingNode, result) { - for (var box in geometryBoxKeywords) { - result.items.push({ - label: box, - documentation: geometryBoxKeywords[box], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), box), - kind: CompletionItemKind.Value - }); - } - return result; - }; - CSSCompletion2.prototype.getBoxProposals = function(entry, existingNode, result) { - for (var box in boxKeywords) { - result.items.push({ - label: box, - documentation: boxKeywords[box], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), box), - kind: CompletionItemKind.Value - }); - } - return result; - }; - CSSCompletion2.prototype.getImageProposals = function(entry, existingNode, result) { - for (var image in imageFunctions) { - var insertText = moveCursorInsideParenthesis(image); - result.items.push({ - label: image, - documentation: imageFunctions[image], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - kind: CompletionItemKind.Function, - insertTextFormat: image !== insertText ? SnippetFormat : void 0 - }); - } - return result; - }; - CSSCompletion2.prototype.getTimingFunctionProposals = function(entry, existingNode, result) { - for (var timing in transitionTimingFunctions) { - var insertText = moveCursorInsideParenthesis(timing); - result.items.push({ - label: timing, - documentation: transitionTimingFunctions[timing], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - kind: CompletionItemKind.Function, - insertTextFormat: timing !== insertText ? SnippetFormat : void 0 - }); - } - return result; - }; - CSSCompletion2.prototype.getBasicShapeProposals = function(entry, existingNode, result) { - for (var shape in basicShapeFunctions) { - var insertText = moveCursorInsideParenthesis(shape); - result.items.push({ - label: shape, - documentation: basicShapeFunctions[shape], - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - kind: CompletionItemKind.Function, - insertTextFormat: shape !== insertText ? SnippetFormat : void 0 - }); - } - return result; - }; - CSSCompletion2.prototype.getCompletionsForStylesheet = function(result) { - var node = this.styleSheet.findFirstChildBeforeOffset(this.offset); - if (!node) { - return this.getCompletionForTopLevel(result); - } - if (node instanceof RuleSet) { - return this.getCompletionsForRuleSet(node, result); - } - if (node instanceof Supports) { - return this.getCompletionsForSupports(node, result); - } - return result; - }; - CSSCompletion2.prototype.getCompletionForTopLevel = function(result) { - var _this = this; - this.cssDataManager.getAtDirectives().forEach(function(entry) { - result.items.push({ - label: entry.name, - textEdit: TextEdit.replace(_this.getCompletionRange(null), entry.name), - documentation: getEntryDescription(entry, _this.doesSupportMarkdown()), - tags: isDeprecated(entry) ? [CompletionItemTag.Deprecated] : [], - kind: CompletionItemKind.Keyword - }); + oe(y.name, ":-") && (C.sortText = We.VendorPrefixed), r.items.push(C); }); - this.getCompletionsForSelector(null, false, result); - return result; - }; - CSSCompletion2.prototype.getCompletionsForRuleSet = function(ruleSet, result) { - var declarations = ruleSet.getDeclarations(); - var isAfter = declarations && declarations.endsWith("}") && this.offset >= declarations.end; - if (isAfter) { - return this.getCompletionForTopLevel(result); - } - var isInSelectors = !declarations || this.offset <= declarations.offset; - if (isInSelectors) { - return this.getCompletionsForSelector(ruleSet, ruleSet.isNested(), result); - } - return this.getCompletionsForDeclarations(ruleSet.getDeclarations(), result); - }; - CSSCompletion2.prototype.getCompletionsForSelector = function(ruleSet, isNested, result) { - var _this = this; - var existingNode = this.findInNodePath(NodeType.PseudoSelector, NodeType.IdentifierSelector, NodeType.ClassSelector, NodeType.ElementNameSelector); - if (!existingNode && this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ":")) { - this.currentWord = ":" + this.currentWord; - if (this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ":")) { - this.currentWord = ":" + this.currentWord; - } - this.defaultReplaceRange = Range.create(Position.create(this.position.line, this.position.character - this.currentWord.length), this.position); - } - var pseudoClasses = this.cssDataManager.getPseudoClasses(); - pseudoClasses.forEach(function(entry2) { - var insertText = moveCursorInsideParenthesis(entry2.name); - var item = { - label: entry2.name, - textEdit: TextEdit.replace(_this.getCompletionRange(existingNode), insertText), - documentation: getEntryDescription(entry2, _this.doesSupportMarkdown()), - tags: isDeprecated(entry2) ? [CompletionItemTag.Deprecated] : [], - kind: CompletionItemKind.Function, - insertTextFormat: entry2.name !== insertText ? SnippetFormat : void 0 + var l = this.cssDataManager.getPseudoElements(); + if (l.forEach(function(y) { + var A = yt(y.name), C = { + label: y.name, + textEdit: B.replace(i.getCompletionRange(a), A), + documentation: et(y, i.doesSupportMarkdown()), + tags: It(y) ? [ot.Deprecated] : [], + kind: V.Function, + insertTextFormat: y.name !== A ? je : void 0 }; - if (startsWith(entry2.name, ":-")) { - item.sortText = SortTexts.VendorPrefixed; - } - result.items.push(item); - }); - var pseudoElements = this.cssDataManager.getPseudoElements(); - pseudoElements.forEach(function(entry2) { - var insertText = moveCursorInsideParenthesis(entry2.name); - var item = { - label: entry2.name, - textEdit: TextEdit.replace(_this.getCompletionRange(existingNode), insertText), - documentation: getEntryDescription(entry2, _this.doesSupportMarkdown()), - tags: isDeprecated(entry2) ? [CompletionItemTag.Deprecated] : [], - kind: CompletionItemKind.Function, - insertTextFormat: entry2.name !== insertText ? SnippetFormat : void 0 - }; - if (startsWith(entry2.name, "::-")) { - item.sortText = SortTexts.VendorPrefixed; - } - result.items.push(item); - }); - if (!isNested) { - for (var _i = 0, _a2 = html5Tags; _i < _a2.length; _i++) { - var entry = _a2[_i]; - result.items.push({ - label: entry, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), entry), - kind: CompletionItemKind.Keyword + oe(y.name, "::-") && (C.sortText = We.VendorPrefixed), r.items.push(C); + }), !n) { + for (var h = 0, c = Eh; h < c.length; h++) { + var d = c[h]; + r.items.push({ + label: d, + textEdit: B.replace(this.getCompletionRange(a), d), + kind: V.Keyword }); } - for (var _b = 0, _c = svgElements; _b < _c.length; _b++) { - var entry = _c[_b]; - result.items.push({ - label: entry, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), entry), - kind: CompletionItemKind.Keyword + for (var p = 0, f = Rh; p < f.length; p++) { + var d = f[p]; + r.items.push({ + label: d, + textEdit: B.replace(this.getCompletionRange(a), d), + kind: V.Keyword }); } } - var visited = {}; - visited[this.currentWord] = true; - var docText = this.textDocument.getText(); - this.styleSheet.accept(function(n) { - if (n.type === NodeType.SimpleSelector && n.length > 0) { - var selector2 = docText.substr(n.offset, n.length); - if (selector2.charAt(0) === "." && !visited[selector2]) { - visited[selector2] = true; - result.items.push({ - label: selector2, - textEdit: TextEdit.replace(_this.getCompletionRange(existingNode), selector2), - kind: CompletionItemKind.Keyword - }); - } - return false; - } - return true; - }); - if (ruleSet && ruleSet.isNested()) { - var selector = ruleSet.getSelectors().findFirstChildBeforeOffset(this.offset); - if (selector && ruleSet.getSelectors().getChildren().indexOf(selector) === 0) { - this.getPropertyProposals(null, result); + var g = {}; + g[this.currentWord] = !0; + var w = this.textDocument.getText(); + if (this.styleSheet.accept(function(y) { + if (y.type === m.SimpleSelector && y.length > 0) { + var A = w.substr(y.offset, y.length); + return A.charAt(0) === "." && !g[A] && (g[A] = !0, r.items.push({ + label: A, + textEdit: B.replace(i.getCompletionRange(a), A), + kind: V.Keyword + })), !1; } + return !0; + }), t && t.isNested()) { + var b = t.getSelectors().findFirstChildBeforeOffset(this.offset); + b && t.getSelectors().getChildren().indexOf(b) === 0 && this.getPropertyProposals(null, r); } - return result; - }; - CSSCompletion2.prototype.getCompletionsForDeclarations = function(declarations, result) { - if (!declarations || this.offset === declarations.offset) { - return result; + return r; + }, e.prototype.getCompletionsForDeclarations = function(t, n) { + if (!t || this.offset === t.offset) + return n; + var r = t.findFirstChildBeforeOffset(this.offset); + if (!r) + return this.getCompletionsForDeclarationProperty(null, n); + if (r instanceof ni) { + var i = r; + if (!Ee(i.colonPosition) || this.offset <= i.colonPosition) + return this.getCompletionsForDeclarationProperty(i, n); + if (Ee(i.semicolonPosition) && i.semicolonPosition < this.offset) + return this.offset === i.semicolonPosition + 1 ? n : this.getCompletionsForDeclarationProperty(null, n); + if (i instanceof Ve) + return this.getCompletionsForDeclarationValue(i, n); + } else + r instanceof qt ? this.getCompletionsForExtendsReference(r, null, n) : this.currentWord && this.currentWord[0] === "@" ? this.getCompletionsForDeclarationProperty(null, n) : r instanceof Ct && this.getCompletionsForDeclarationProperty(null, n); + return n; + }, e.prototype.getCompletionsForVariableDeclaration = function(t, n) { + return this.offset && Ee(t.colonPosition) && this.offset > t.colonPosition && this.getVariableProposals(t.getValue(), n), n; + }, e.prototype.getCompletionsForExpression = function(t, n) { + var r = t.getParent(); + if (r instanceof Dt) + return this.getCompletionsForFunctionArgument(r, r.getParent(), n), n; + var i = t.findParent(m.Declaration); + if (!i) + return this.getTermProposals(void 0, null, n), n; + var a = t.findChildAtOffset(this.offset, !0); + return a ? a instanceof oi || a instanceof Re ? this.getCompletionsForDeclarationValue(i, n) : n : this.getCompletionsForDeclarationValue(i, n); + }, e.prototype.getCompletionsForFunctionArgument = function(t, n, r) { + var i = n.getIdentifier(); + return i && i.matches("var") && (!n.getArguments().hasChildren() || n.getArguments().getChild(0) === t) && this.getVariableProposalsForCSSVarFunction(r), r; + }, e.prototype.getCompletionsForFunctionDeclaration = function(t, n) { + var r = t.getDeclarations(); + return r && this.offset > r.offset && this.offset < r.end && this.getTermProposals(void 0, null, n), n; + }, e.prototype.getCompletionsForMixinReference = function(t, n) { + for (var r = this, i = this.getSymbolContext().findSymbolsAtOffset(this.offset, G.Mixin), a = 0, o = i; a < o.length; a++) { + var l = o[a]; + l.node instanceof $t && n.items.push(this.makeTermProposal(l, l.node.getParameters(), null)); } - var node = declarations.findFirstChildBeforeOffset(this.offset); - if (!node) { - return this.getCompletionsForDeclarationProperty(null, result); + var h = t.getIdentifier() || null; + return this.completionParticipants.forEach(function(c) { + c.onCssMixinReference && c.onCssMixinReference({ + mixinName: r.currentWord, + range: r.getCompletionRange(h) + }); + }), n; + }, e.prototype.getTermProposals = function(t, n, r) { + for (var i = this.getSymbolContext().findSymbolsAtOffset(this.offset, G.Function), a = 0, o = i; a < o.length; a++) { + var l = o[a]; + l.node instanceof kn && r.items.push(this.makeTermProposal(l, l.node.getParameters(), n)); } - if (node instanceof AbstractDeclaration) { - var declaration = node; - if (!isDefined(declaration.colonPosition) || this.offset <= declaration.colonPosition) { - return this.getCompletionsForDeclarationProperty(declaration, result); - } else if (isDefined(declaration.semicolonPosition) && declaration.semicolonPosition < this.offset) { - if (this.offset === declaration.semicolonPosition + 1) { - return result; - } - return this.getCompletionsForDeclarationProperty(null, result); - } - if (declaration instanceof Declaration) { - return this.getCompletionsForDeclarationValue(declaration, result); - } - } else if (node instanceof ExtendsReference) { - this.getCompletionsForExtendsReference(node, null, result); - } else if (this.currentWord && this.currentWord[0] === "@") { - this.getCompletionsForDeclarationProperty(null, result); - } else if (node instanceof RuleSet) { - this.getCompletionsForDeclarationProperty(null, result); - } - return result; - }; - CSSCompletion2.prototype.getCompletionsForVariableDeclaration = function(declaration, result) { - if (this.offset && isDefined(declaration.colonPosition) && this.offset > declaration.colonPosition) { - this.getVariableProposals(declaration.getValue(), result); - } - return result; - }; - CSSCompletion2.prototype.getCompletionsForExpression = function(expression, result) { - var parent = expression.getParent(); - if (parent instanceof FunctionArgument) { - this.getCompletionsForFunctionArgument(parent, parent.getParent(), result); - return result; - } - var declaration = expression.findParent(NodeType.Declaration); - if (!declaration) { - this.getTermProposals(void 0, null, result); - return result; - } - var node = expression.findChildAtOffset(this.offset, true); - if (!node) { - return this.getCompletionsForDeclarationValue(declaration, result); - } - if (node instanceof NumericValue || node instanceof Identifier) { - return this.getCompletionsForDeclarationValue(declaration, result); - } - return result; - }; - CSSCompletion2.prototype.getCompletionsForFunctionArgument = function(arg, func, result) { - var identifier = func.getIdentifier(); - if (identifier && identifier.matches("var")) { - if (!func.getArguments().hasChildren() || func.getArguments().getChild(0) === arg) { - this.getVariableProposalsForCSSVarFunction(result); - } - } - return result; - }; - CSSCompletion2.prototype.getCompletionsForFunctionDeclaration = function(decl, result) { - var declarations = decl.getDeclarations(); - if (declarations && this.offset > declarations.offset && this.offset < declarations.end) { - this.getTermProposals(void 0, null, result); - } - return result; - }; - CSSCompletion2.prototype.getCompletionsForMixinReference = function(ref, result) { - var _this = this; - var allMixins = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Mixin); - for (var _i = 0, allMixins_1 = allMixins; _i < allMixins_1.length; _i++) { - var mixinSymbol = allMixins_1[_i]; - if (mixinSymbol.node instanceof MixinDeclaration) { - result.items.push(this.makeTermProposal(mixinSymbol, mixinSymbol.node.getParameters(), null)); - } - } - var identifierNode = ref.getIdentifier() || null; - this.completionParticipants.forEach(function(participant) { - if (participant.onCssMixinReference) { - participant.onCssMixinReference({ - mixinName: _this.currentWord, - range: _this.getCompletionRange(identifierNode) - }); - } - }); - return result; - }; - CSSCompletion2.prototype.getTermProposals = function(entry, existingNode, result) { - var allFunctions = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Function); - for (var _i = 0, allFunctions_1 = allFunctions; _i < allFunctions_1.length; _i++) { - var functionSymbol = allFunctions_1[_i]; - if (functionSymbol.node instanceof FunctionDeclaration) { - result.items.push(this.makeTermProposal(functionSymbol, functionSymbol.node.getParameters(), existingNode)); - } - } - return result; - }; - CSSCompletion2.prototype.makeTermProposal = function(symbol, parameters, existingNode) { - symbol.node; - var params = parameters.getChildren().map(function(c) { - return c instanceof FunctionParameter ? c.getName() : c.getText(); - }); - var insertText = symbol.name + "(" + params.map(function(p, index) { - return "${" + (index + 1) + ":" + p + "}"; + return r; + }, e.prototype.makeTermProposal = function(t, n, r) { + t.node; + var i = n.getChildren().map(function(o) { + return o instanceof On ? o.getName() : o.getText(); + }), a = t.name + "(" + i.map(function(o, l) { + return "${" + (l + 1) + ":" + o + "}"; }).join(", ") + ")"; return { - label: symbol.name, - detail: symbol.name + "(" + params.join(", ") + ")", - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - insertTextFormat: SnippetFormat, - kind: CompletionItemKind.Function, - sortText: SortTexts.Term + label: t.name, + detail: t.name + "(" + i.join(", ") + ")", + textEdit: B.replace(this.getCompletionRange(r), a), + insertTextFormat: je, + kind: V.Function, + sortText: We.Term }; - }; - CSSCompletion2.prototype.getCompletionsForSupportsCondition = function(supportsCondition, result) { - var child = supportsCondition.findFirstChildBeforeOffset(this.offset); - if (child) { - if (child instanceof Declaration) { - if (!isDefined(child.colonPosition) || this.offset <= child.colonPosition) { - return this.getCompletionsForDeclarationProperty(child, result); - } else { - return this.getCompletionsForDeclarationValue(child, result); - } - } else if (child instanceof SupportsCondition) { - return this.getCompletionsForSupportsCondition(child, result); - } + }, e.prototype.getCompletionsForSupportsCondition = function(t, n) { + var r = t.findFirstChildBeforeOffset(this.offset); + if (r) { + if (r instanceof Ve) + return !Ee(r.colonPosition) || this.offset <= r.colonPosition ? this.getCompletionsForDeclarationProperty(r, n) : this.getCompletionsForDeclarationValue(r, n); + if (r instanceof Ut) + return this.getCompletionsForSupportsCondition(r, n); } - if (isDefined(supportsCondition.lParent) && this.offset > supportsCondition.lParent && (!isDefined(supportsCondition.rParent) || this.offset <= supportsCondition.rParent)) { - return this.getCompletionsForDeclarationProperty(null, result); + return Ee(t.lParent) && this.offset > t.lParent && (!Ee(t.rParent) || this.offset <= t.rParent) ? this.getCompletionsForDeclarationProperty(null, n) : n; + }, e.prototype.getCompletionsForSupports = function(t, n) { + var r = t.getDeclarations(), i = !r || this.offset <= r.offset; + if (i) { + var a = t.findFirstChildBeforeOffset(this.offset); + return a instanceof Ut ? this.getCompletionsForSupportsCondition(a, n) : n; } - return result; - }; - CSSCompletion2.prototype.getCompletionsForSupports = function(supports, result) { - var declarations = supports.getDeclarations(); - var inInCondition = !declarations || this.offset <= declarations.offset; - if (inInCondition) { - var child = supports.findFirstChildBeforeOffset(this.offset); - if (child instanceof SupportsCondition) { - return this.getCompletionsForSupportsCondition(child, result); - } - return result; - } - return this.getCompletionForTopLevel(result); - }; - CSSCompletion2.prototype.getCompletionsForExtendsReference = function(extendsRef, existingNode, result) { - return result; - }; - CSSCompletion2.prototype.getCompletionForUriLiteralValue = function(uriLiteralNode, result) { - var uriValue; - var position; - var range; - if (!uriLiteralNode.hasChildren()) { - uriValue = ""; - position = this.position; - var emptyURIValuePosition = this.textDocument.positionAt(uriLiteralNode.offset + "url(".length); - range = Range.create(emptyURIValuePosition, emptyURIValuePosition); + return this.getCompletionForTopLevel(n); + }, e.prototype.getCompletionsForExtendsReference = function(t, n, r) { + return r; + }, e.prototype.getCompletionForUriLiteralValue = function(t, n) { + var r, i, a; + if (t.hasChildren()) { + var l = t.getChild(0); + r = l.getText(), i = this.position, a = this.getCompletionRange(l); } else { - var uriValueNode = uriLiteralNode.getChild(0); - uriValue = uriValueNode.getText(); - position = this.position; - range = this.getCompletionRange(uriValueNode); + r = "", i = this.position; + var o = this.textDocument.positionAt(t.offset + 4); + a = Q.create(o, o); } - this.completionParticipants.forEach(function(participant) { - if (participant.onCssURILiteralValue) { - participant.onCssURILiteralValue({ - uriValue, - position, - range - }); - } - }); - return result; - }; - CSSCompletion2.prototype.getCompletionForImportPath = function(importPathNode, result) { - var _this = this; - this.completionParticipants.forEach(function(participant) { - if (participant.onCssImportPath) { - participant.onCssImportPath({ - pathValue: importPathNode.getText(), - position: _this.position, - range: _this.getCompletionRange(importPathNode) - }); - } - }); - return result; - }; - CSSCompletion2.prototype.hasCharacterAtPosition = function(offset, char) { - var text = this.textDocument.getText(); - return offset >= 0 && offset < text.length && text.charAt(offset) === char; - }; - CSSCompletion2.prototype.doesSupportMarkdown = function() { - var _a2, _b, _c; - if (!isDefined(this.supportsMarkdown)) { - if (!isDefined(this.lsOptions.clientCapabilities)) { - this.supportsMarkdown = true; - return this.supportsMarkdown; - } - var documentationFormat = (_c = (_b = (_a2 = this.lsOptions.clientCapabilities.textDocument) === null || _a2 === void 0 ? void 0 : _a2.completion) === null || _b === void 0 ? void 0 : _b.completionItem) === null || _c === void 0 ? void 0 : _c.documentationFormat; - this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(MarkupKind.Markdown) !== -1; + return this.completionParticipants.forEach(function(h) { + h.onCssURILiteralValue && h.onCssURILiteralValue({ + uriValue: r, + position: i, + range: a + }); + }), n; + }, e.prototype.getCompletionForImportPath = function(t, n) { + var r = this; + return this.completionParticipants.forEach(function(i) { + i.onCssImportPath && i.onCssImportPath({ + pathValue: t.getText(), + position: r.position, + range: r.getCompletionRange(t) + }); + }), n; + }, e.prototype.hasCharacterAtPosition = function(t, n) { + var r = this.textDocument.getText(); + return t >= 0 && t < r.length && r.charAt(t) === n; + }, e.prototype.doesSupportMarkdown = function() { + var t, n, r; + if (!Ee(this.supportsMarkdown)) { + if (!Ee(this.lsOptions.clientCapabilities)) + return this.supportsMarkdown = !0, this.supportsMarkdown; + var i = (r = (n = (t = this.lsOptions.clientCapabilities.textDocument) === null || t === void 0 ? void 0 : t.completion) === null || n === void 0 ? void 0 : n.completionItem) === null || r === void 0 ? void 0 : r.documentationFormat; + this.supportsMarkdown = Array.isArray(i) && i.indexOf(Ae.Markdown) !== -1; } return this.supportsMarkdown; - }; - return CSSCompletion2; + }, e; }(); -function isDeprecated(entry) { - if (entry.status && (entry.status === "nonstandard" || entry.status === "obsolete")) { - return true; - } - return false; +function It(e) { + return !!(e.status && (e.status === "nonstandard" || e.status === "obsolete")); } -var Set$1 = function() { - function Set2() { +var qr = function() { + function e() { this.entries = {}; } - Set2.prototype.add = function(entry) { - this.entries[entry] = true; - }; - Set2.prototype.remove = function(entry) { - delete this.entries[entry]; - }; - Set2.prototype.getEntries = function() { + return e.prototype.add = function(t) { + this.entries[t] = !0; + }, e.prototype.remove = function(t) { + delete this.entries[t]; + }, e.prototype.getEntries = function() { return Object.keys(this.entries); - }; - return Set2; + }, e; }(); -function moveCursorInsideParenthesis(text) { - return text.replace(/\(\)$/, "($1)"); +function yt(e) { + return e.replace(/\(\)$/, "($1)"); } -function collectValues(styleSheet, declaration) { - var fullPropertyName = declaration.getFullPropertyName(); - var entries = new Set$1(); - function visitValue(node) { - if (node instanceof Identifier || node instanceof NumericValue || node instanceof HexColorValue) { - entries.add(node.getText()); +function qh(e, t) { + var n = t.getFullPropertyName(), r = new qr(); + function i(l) { + return (l instanceof Re || l instanceof oi || l instanceof si) && r.add(l.getText()), !0; + } + function a(l) { + var h = l.getFullPropertyName(); + return n === h; + } + function o(l) { + if (l instanceof Ve && l !== t && a(l)) { + var h = l.getValue(); + h && h.accept(i); } - return true; + return !0; } - function matchesProperty(decl) { - var propertyName = decl.getFullPropertyName(); - return fullPropertyName === propertyName; - } - function vistNode(node) { - if (node instanceof Declaration && node !== declaration) { - if (matchesProperty(node)) { - var value = node.getValue(); - if (value) { - value.accept(visitValue); - } - } - } - return true; - } - styleSheet.accept(vistNode); - return entries; + return e.accept(o), r; } -var ColorValueCollector = function() { - function ColorValueCollector2(entries, currentOffset) { - this.entries = entries; - this.currentOffset = currentOffset; +var $h = function() { + function e(t, n) { + this.entries = t, this.currentOffset = n; } - ColorValueCollector2.prototype.visitNode = function(node) { - if (node instanceof HexColorValue || node instanceof Function && isColorConstructor(node)) { - if (this.currentOffset < node.offset || node.end < this.currentOffset) { - this.entries.add(node.getText()); - } - } - return true; - }; - return ColorValueCollector2; + return e.prototype.visitNode = function(t) { + return (t instanceof si || t instanceof nn && wh(t)) && (this.currentOffset < t.offset || t.end < this.currentOffset) && this.entries.add(t.getText()), !0; + }, e; +}(), Hh = function() { + function e(t, n) { + this.entries = t, this.currentOffset = n; + } + return e.prototype.visitNode = function(t) { + return t instanceof Re && t.isCustomProperty && (this.currentOffset < t.offset || t.end < this.currentOffset) && this.entries.add(t.getText()), !0; + }, e; }(); -var VariableCollector = function() { - function VariableCollector2(entries, currentOffset) { - this.entries = entries; - this.currentOffset = currentOffset; - } - VariableCollector2.prototype.visitNode = function(node) { - if (node instanceof Identifier && node.isCustomProperty) { - if (this.currentOffset < node.offset || node.end < this.currentOffset) { - this.entries.add(node.getText()); - } - } - return true; - }; - return VariableCollector2; -}(); -function getCurrentWord(document, offset) { - var i = offset - 1; - var text = document.getText(); - while (i >= 0 && ' \n\r":{[()]},*>+'.indexOf(text.charAt(i)) === -1) { - i--; - } - return text.substring(i + 1, offset); +function Gh(e, t) { + for (var n = t - 1, r = e.getText(); n >= 0 && ` +\r":{[()]},*>+`.indexOf(r.charAt(n)) === -1; ) + n--; + return r.substring(n + 1, t); } -function isColorString(s) { - return s.toLowerCase() in colors || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(s); +function As(e) { + return e.toLowerCase() in Nn || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e); } -var __extends3 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); +var Fo = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(); -var localize5 = loadMessageBundle(); -var Element = function() { - function Element3() { - this.parent = null; - this.children = null; - this.attributes = null; +}(), Jh = Le(), ui = function() { + function e() { + this.parent = null, this.children = null, this.attributes = null; } - Element3.prototype.findAttribute = function(name) { - if (this.attributes) { - for (var _i = 0, _a2 = this.attributes; _i < _a2.length; _i++) { - var attribute = _a2[_i]; - if (attribute.name === name) { - return attribute.value; - } + return e.prototype.findAttribute = function(t) { + if (this.attributes) + for (var n = 0, r = this.attributes; n < r.length; n++) { + var i = r[n]; + if (i.name === t) + return i.value; } - } return null; - }; - Element3.prototype.addChild = function(child) { - if (child instanceof Element3) { - child.parent = this; - } - if (!this.children) { - this.children = []; - } - this.children.push(child); - }; - Element3.prototype.append = function(text) { + }, e.prototype.addChild = function(t) { + t instanceof e && (t.parent = this), this.children || (this.children = []), this.children.push(t); + }, e.prototype.append = function(t) { if (this.attributes) { - var last = this.attributes[this.attributes.length - 1]; - last.value = last.value + text; + var n = this.attributes[this.attributes.length - 1]; + n.value = n.value + t; } - }; - Element3.prototype.prepend = function(text) { + }, e.prototype.prepend = function(t) { if (this.attributes) { - var first = this.attributes[0]; - first.value = text + first.value; + var n = this.attributes[0]; + n.value = t + n.value; } - }; - Element3.prototype.findRoot = function() { - var curr = this; - while (curr.parent && !(curr.parent instanceof RootElement)) { - curr = curr.parent; - } - return curr; - }; - Element3.prototype.removeChild = function(child) { + }, e.prototype.findRoot = function() { + for (var t = this; t.parent && !(t.parent instanceof Rt); ) + t = t.parent; + return t; + }, e.prototype.removeChild = function(t) { if (this.children) { - var index = this.children.indexOf(child); - if (index !== -1) { - this.children.splice(index, 1); - return true; - } + var n = this.children.indexOf(t); + if (n !== -1) + return this.children.splice(n, 1), !0; } - return false; - }; - Element3.prototype.addAttr = function(name, value) { - if (!this.attributes) { - this.attributes = []; - } - for (var _i = 0, _a2 = this.attributes; _i < _a2.length; _i++) { - var attribute = _a2[_i]; - if (attribute.name === name) { - attribute.value += " " + value; + return !1; + }, e.prototype.addAttr = function(t, n) { + this.attributes || (this.attributes = []); + for (var r = 0, i = this.attributes; r < i.length; r++) { + var a = i[r]; + if (a.name === t) { + a.value += " " + n; return; } } - this.attributes.push({ name, value }); - }; - Element3.prototype.clone = function(cloneChildren) { - if (cloneChildren === void 0) { - cloneChildren = true; - } - var elem = new Element3(); + this.attributes.push({ name: t, value: n }); + }, e.prototype.clone = function(t) { + t === void 0 && (t = !0); + var n = new e(); if (this.attributes) { - elem.attributes = []; - for (var _i = 0, _a2 = this.attributes; _i < _a2.length; _i++) { - var attribute = _a2[_i]; - elem.addAttr(attribute.name, attribute.value); + n.attributes = []; + for (var r = 0, i = this.attributes; r < i.length; r++) { + var a = i[r]; + n.addAttr(a.name, a.value); } } - if (cloneChildren && this.children) { - elem.children = []; - for (var index = 0; index < this.children.length; index++) { - elem.addChild(this.children[index].clone()); - } + if (t && this.children) { + n.children = []; + for (var o = 0; o < this.children.length; o++) + n.addChild(this.children[o].clone()); } - return elem; - }; - Element3.prototype.cloneWithParent = function() { - var clone = this.clone(false); - if (this.parent && !(this.parent instanceof RootElement)) { - var parentClone = this.parent.cloneWithParent(); - parentClone.addChild(clone); + return n; + }, e.prototype.cloneWithParent = function() { + var t = this.clone(!1); + if (this.parent && !(this.parent instanceof Rt)) { + var n = this.parent.cloneWithParent(); + n.addChild(t); } - return clone; - }; - return Element3; -}(); -var RootElement = function(_super) { - __extends3(RootElement2, _super); - function RootElement2() { - return _super !== null && _super.apply(this, arguments) || this; + return t; + }, e; +}(), Rt = function(e) { + Fo(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - return RootElement2; -}(Element); -var LabelElement = function(_super) { - __extends3(LabelElement2, _super); - function LabelElement2(label) { - var _this = _super.call(this) || this; - _this.addAttr("name", label); - return _this; + return t; +}(ui), $r = function(e) { + Fo(t, e); + function t(n) { + var r = e.call(this) || this; + return r.addAttr("name", n), r; } - return LabelElement2; -}(Element); -var MarkedStringPrinter = function() { - function MarkedStringPrinter2(quote) { - this.quote = quote; - this.result = []; + return t; +}(ui), zs = function() { + function e(t) { + this.quote = t, this.result = []; } - MarkedStringPrinter2.prototype.print = function(element) { - this.result = []; - if (element instanceof RootElement) { - if (element.children) { - this.doPrint(element.children, 0); - } - } else { - this.doPrint([element], 0); + return e.prototype.print = function(t) { + this.result = [], t instanceof Rt ? t.children && this.doPrint(t.children, 0) : this.doPrint([t], 0); + var n = this.result.join(` +`); + return [{ language: "html", value: n }]; + }, e.prototype.doPrint = function(t, n) { + for (var r = 0, i = t; r < i.length; r++) { + var a = i[r]; + this.doPrintElement(a, n), a.children && this.doPrint(a.children, n + 1); } - var value = this.result.join("\n"); - return [{ language: "html", value }]; - }; - MarkedStringPrinter2.prototype.doPrint = function(elements, indent) { - for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { - var element = elements_1[_i]; - this.doPrintElement(element, indent); - if (element.children) { - this.doPrint(element.children, indent + 1); - } - } - }; - MarkedStringPrinter2.prototype.writeLine = function(level, content) { - var indent = new Array(level + 1).join(" "); - this.result.push(indent + content); - }; - MarkedStringPrinter2.prototype.doPrintElement = function(element, indent) { - var name = element.findAttribute("name"); - if (element instanceof LabelElement || name === "\u2026") { - this.writeLine(indent, name); + }, e.prototype.writeLine = function(t, n) { + var r = new Array(t + 1).join(" "); + this.result.push(r + n); + }, e.prototype.doPrintElement = function(t, n) { + var r = t.findAttribute("name"); + if (t instanceof $r || r === "\u2026") { + this.writeLine(n, r); return; } - var content = ["<"]; - if (name) { - content.push(name); - } else { - content.push("element"); - } - if (element.attributes) { - for (var _i = 0, _a2 = element.attributes; _i < _a2.length; _i++) { - var attr = _a2[_i]; - if (attr.name !== "name") { - content.push(" "); - content.push(attr.name); - var value = attr.value; - if (value) { - content.push("="); - content.push(quotes.ensure(value, this.quote)); - } + var i = ["<"]; + if (r ? i.push(r) : i.push("element"), t.attributes) + for (var a = 0, o = t.attributes; a < o.length; a++) { + var l = o[a]; + if (l.name !== "name") { + i.push(" "), i.push(l.name); + var h = l.value; + h && (i.push("="), i.push($e.ensure(h, this.quote))); } } - } - content.push(">"); - this.writeLine(indent, content.join("")); - }; - return MarkedStringPrinter2; + i.push(">"), this.writeLine(n, i.join("")); + }, e; +}(), $e; +(function(e) { + function t(r, i) { + return i + n(r) + i; + } + e.ensure = t; + function n(r) { + var i = r.match(/^['"](.*)["']$/); + return i ? i[1] : r; + } + e.remove = n; +})($e || ($e = {})); +var Xh = function() { + function e() { + this.id = 0, this.attr = 0, this.tag = 0; + } + return e; }(); -var quotes; -(function(quotes2) { - function ensure(value, which) { - return which + remove(value) + which; - } - quotes2.ensure = ensure; - function remove(value) { - var match = value.match(/^['"](.*)["']$/); - if (match) { - return match[1]; - } - return value; - } - quotes2.remove = remove; -})(quotes || (quotes = {})); -var Specificity = function() { - function Specificity2() { - this.id = 0; - this.attr = 0; - this.tag = 0; - } - return Specificity2; -}(); -function toElement(node, parentElement) { - var result = new Element(); - for (var _i = 0, _a2 = node.getChildren(); _i < _a2.length; _i++) { - var child = _a2[_i]; - switch (child.type) { - case NodeType.SelectorCombinator: - if (parentElement) { - var segments = child.getText().split("&"); - if (segments.length === 1) { - result.addAttr("name", segments[0]); +function _o(e, t) { + for (var n = new ui(), r = 0, i = e.getChildren(); r < i.length; r++) { + var a = i[r]; + switch (a.type) { + case m.SelectorCombinator: + if (t) { + var o = a.getText().split("&"); + if (o.length === 1) { + n.addAttr("name", o[0]); break; } - result = parentElement.cloneWithParent(); - if (segments[0]) { - var root = result.findRoot(); - root.prepend(segments[0]); + if (n = t.cloneWithParent(), o[0]) { + var l = n.findRoot(); + l.prepend(o[0]); } - for (var i = 1; i < segments.length; i++) { - if (i > 1) { - var clone = parentElement.cloneWithParent(); - result.addChild(clone.findRoot()); - result = clone; + for (var h = 1; h < o.length; h++) { + if (h > 1) { + var c = t.cloneWithParent(); + n.addChild(c.findRoot()), n = c; } - result.append(segments[i]); + n.append(o[h]); } } break; - case NodeType.SelectorPlaceholder: - if (child.matches("@at-root")) { - return result; - } - case NodeType.ElementNameSelector: - var text = child.getText(); - result.addAttr("name", text === "*" ? "element" : unescape(text)); + case m.SelectorPlaceholder: + if (a.matches("@at-root")) + return n; + case m.ElementNameSelector: + var d = a.getText(); + n.addAttr("name", d === "*" ? "element" : De(d)); break; - case NodeType.ClassSelector: - result.addAttr("class", unescape(child.getText().substring(1))); + case m.ClassSelector: + n.addAttr("class", De(a.getText().substring(1))); break; - case NodeType.IdentifierSelector: - result.addAttr("id", unescape(child.getText().substring(1))); + case m.IdentifierSelector: + n.addAttr("id", De(a.getText().substring(1))); break; - case NodeType.MixinDeclaration: - result.addAttr("class", child.getName()); + case m.MixinDeclaration: + n.addAttr("class", a.getName()); break; - case NodeType.PseudoSelector: - result.addAttr(unescape(child.getText()), ""); + case m.PseudoSelector: + n.addAttr(De(a.getText()), ""); break; - case NodeType.AttributeSelector: - var selector = child; - var identifier = selector.getIdentifier(); - if (identifier) { - var expression = selector.getValue(); - var operator = selector.getOperator(); - var value = void 0; - if (expression && operator) { - switch (unescape(operator.getText())) { + case m.AttributeSelector: + var p = a, f = p.getIdentifier(); + if (f) { + var g = p.getValue(), w = p.getOperator(), b = void 0; + if (g && w) + switch (De(w.getText())) { case "|=": - value = "".concat(quotes.remove(unescape(expression.getText())), "-\u2026"); + b = "".concat($e.remove(De(g.getText())), "-\u2026"); break; case "^=": - value = "".concat(quotes.remove(unescape(expression.getText())), "\u2026"); + b = "".concat($e.remove(De(g.getText())), "\u2026"); break; case "$=": - value = "\u2026".concat(quotes.remove(unescape(expression.getText()))); + b = "\u2026".concat($e.remove(De(g.getText()))); break; case "~=": - value = " \u2026 ".concat(quotes.remove(unescape(expression.getText())), " \u2026 "); + b = " \u2026 ".concat($e.remove(De(g.getText())), " \u2026 "); break; case "*=": - value = "\u2026".concat(quotes.remove(unescape(expression.getText())), "\u2026"); + b = "\u2026".concat($e.remove(De(g.getText())), "\u2026"); break; default: - value = quotes.remove(unescape(expression.getText())); + b = $e.remove(De(g.getText())); break; } - } - result.addAttr(unescape(identifier.getText()), value); + n.addAttr(De(f.getText()), b); } break; } } - return result; + return n; } -function unescape(content) { - var scanner = new Scanner(); - scanner.setSource(content); - var token = scanner.scanUnquotedString(); - if (token) { - return token.text; - } - return content; +function De(e) { + var t = new en(); + t.setSource(e); + var n = t.scanUnquotedString(); + return n ? n.text : e; } -var SelectorPrinting = function() { - function SelectorPrinting2(cssDataManager) { - this.cssDataManager = cssDataManager; +var Yh = function() { + function e(t) { + this.cssDataManager = t; } - SelectorPrinting2.prototype.selectorToMarkedString = function(node) { - var root = selectorToElement(node); - if (root) { - var markedStrings = new MarkedStringPrinter('"').print(root); - markedStrings.push(this.selectorToSpecificityMarkedString(node)); - return markedStrings; - } else { + return e.prototype.selectorToMarkedString = function(t) { + var n = Qh(t); + if (n) { + var r = new zs('"').print(n); + return r.push(this.selectorToSpecificityMarkedString(t)), r; + } else return []; - } - }; - SelectorPrinting2.prototype.simpleSelectorToMarkedString = function(node) { - var element = toElement(node); - var markedStrings = new MarkedStringPrinter('"').print(element); - markedStrings.push(this.selectorToSpecificityMarkedString(node)); - return markedStrings; - }; - SelectorPrinting2.prototype.isPseudoElementIdentifier = function(text) { - var match = text.match(/^::?([\w-]+)/); - if (!match) { - return false; - } - return !!this.cssDataManager.getPseudoElement("::" + match[1]); - }; - SelectorPrinting2.prototype.selectorToSpecificityMarkedString = function(node) { - var _this = this; - var calculateScore = function(node2) { - for (var _i = 0, _a2 = node2.getChildren(); _i < _a2.length; _i++) { - var element = _a2[_i]; - switch (element.type) { - case NodeType.IdentifierSelector: - specificity.id++; + }, e.prototype.simpleSelectorToMarkedString = function(t) { + var n = _o(t), r = new zs('"').print(n); + return r.push(this.selectorToSpecificityMarkedString(t)), r; + }, e.prototype.isPseudoElementIdentifier = function(t) { + var n = t.match(/^::?([\w-]+)/); + return n ? !!this.cssDataManager.getPseudoElement("::" + n[1]) : !1; + }, e.prototype.selectorToSpecificityMarkedString = function(t) { + var n = this, r = function(a) { + for (var o = 0, l = a.getChildren(); o < l.length; o++) { + var h = l[o]; + switch (h.type) { + case m.IdentifierSelector: + i.id++; break; - case NodeType.ClassSelector: - case NodeType.AttributeSelector: - specificity.attr++; + case m.ClassSelector: + case m.AttributeSelector: + i.attr++; break; - case NodeType.ElementNameSelector: - if (element.matches("*")) { + case m.ElementNameSelector: + if (h.matches("*")) break; - } - specificity.tag++; + i.tag++; break; - case NodeType.PseudoSelector: - var text = element.getText(); - if (_this.isPseudoElementIdentifier(text)) { - specificity.tag++; - } else { - if (text.match(/^:not/i)) { + case m.PseudoSelector: + var c = h.getText(); + if (n.isPseudoElementIdentifier(c)) + i.tag++; + else { + if (c.match(/^:not/i)) break; - } - specificity.attr++; + i.attr++; } break; } - if (element.getChildren().length > 0) { - calculateScore(element); - } + h.getChildren().length > 0 && r(h); } - }; - var specificity = new Specificity(); - calculateScore(node); - return localize5("specificity", "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", specificity.id, specificity.attr, specificity.tag); - }; - return SelectorPrinting2; -}(); -var SelectorElementBuilder = function() { - function SelectorElementBuilder2(element) { - this.prev = null; - this.element = element; + }, i = new Xh(); + return r(t), Jh("specificity", "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", i.id, i.attr, i.tag); + }, e; +}(), Kh = function() { + function e(t) { + this.prev = null, this.element = t; } - SelectorElementBuilder2.prototype.processSelector = function(selector) { - var parentElement = null; - if (!(this.element instanceof RootElement)) { - if (selector.getChildren().some(function(c) { - return c.hasChildren() && c.getChild(0).type === NodeType.SelectorCombinator; - })) { - var curr = this.element.findRoot(); - if (curr.parent instanceof RootElement) { - parentElement = this.element; - this.element = curr.parent; - this.element.removeChild(curr); - this.prev = null; - } - } + return e.prototype.processSelector = function(t) { + var n = null; + if (!(this.element instanceof Rt) && t.getChildren().some(function(d) { + return d.hasChildren() && d.getChild(0).type === m.SelectorCombinator; + })) { + var r = this.element.findRoot(); + r.parent instanceof Rt && (n = this.element, this.element = r.parent, this.element.removeChild(r), this.prev = null); } - for (var _i = 0, _a2 = selector.getChildren(); _i < _a2.length; _i++) { - var selectorChild = _a2[_i]; - if (selectorChild instanceof SimpleSelector) { - if (this.prev instanceof SimpleSelector) { - var labelElement = new LabelElement("\u2026"); - this.element.addChild(labelElement); - this.element = labelElement; - } else if (this.prev && (this.prev.matches("+") || this.prev.matches("~")) && this.element.parent) { - this.element = this.element.parent; - } - if (this.prev && this.prev.matches("~")) { - this.element.addChild(new LabelElement("\u22EE")); - } - var thisElement = toElement(selectorChild, parentElement); - var root = thisElement.findRoot(); - this.element.addChild(root); - this.element = thisElement; - } - if (selectorChild instanceof SimpleSelector || selectorChild.type === NodeType.SelectorCombinatorParent || selectorChild.type === NodeType.SelectorCombinatorShadowPiercingDescendant || selectorChild.type === NodeType.SelectorCombinatorSibling || selectorChild.type === NodeType.SelectorCombinatorAllSiblings) { - this.prev = selectorChild; + for (var i = 0, a = t.getChildren(); i < a.length; i++) { + var o = a[i]; + if (o instanceof kt) { + if (this.prev instanceof kt) { + var l = new $r("\u2026"); + this.element.addChild(l), this.element = l; + } 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 $r("\u22EE")); + var h = _o(o, n), c = h.findRoot(); + this.element.addChild(c), this.element = h; } + (o instanceof kt || o.type === m.SelectorCombinatorParent || o.type === m.SelectorCombinatorShadowPiercingDescendant || o.type === m.SelectorCombinatorSibling || o.type === m.SelectorCombinatorAllSiblings) && (this.prev = o); } - }; - return SelectorElementBuilder2; + }, e; }(); -function isNewSelectorContext(node) { - switch (node.type) { - case NodeType.MixinDeclaration: - case NodeType.Stylesheet: - return true; +function Zh(e) { + switch (e.type) { + case m.MixinDeclaration: + case m.Stylesheet: + return !0; } - return false; + return !1; } -function selectorToElement(node) { - if (node.matches("@at-root")) { +function Qh(e) { + if (e.matches("@at-root")) return null; - } - var root = new RootElement(); - var parentRuleSets = []; - var ruleSet = node.getParent(); - if (ruleSet instanceof RuleSet) { - var parent = ruleSet.getParent(); - while (parent && !isNewSelectorContext(parent)) { - if (parent instanceof RuleSet) { - if (parent.getSelectors().matches("@at-root")) { + var t = new Rt(), n = [], r = e.getParent(); + if (r instanceof Ct) + for (var i = r.getParent(); i && !Zh(i); ) { + if (i instanceof Ct) { + if (i.getSelectors().matches("@at-root")) break; - } - parentRuleSets.push(parent); + n.push(i); } - parent = parent.getParent(); + i = i.getParent(); } + for (var a = new Kh(t), o = n.length - 1; o >= 0; o--) { + var l = n[o].getSelectors().getChild(0); + l && a.processSelector(l); } - var builder = new SelectorElementBuilder(root); - for (var i = parentRuleSets.length - 1; i >= 0; i--) { - var selector = parentRuleSets[i].getSelectors().getChild(0); - if (selector) { - builder.processSelector(selector); - } - } - builder.processSelector(node); - return root; + return a.processSelector(e), t; } -var CSSHover = function() { - function CSSHover2(clientCapabilities, cssDataManager) { - this.clientCapabilities = clientCapabilities; - this.cssDataManager = cssDataManager; - this.selectorPrinting = new SelectorPrinting(cssDataManager); +var pi = function() { + function e(t, n) { + this.clientCapabilities = t, this.cssDataManager = n, this.selectorPrinting = new Yh(n); } - CSSHover2.prototype.configure = function(settings) { - this.defaultSettings = settings; - }; - CSSHover2.prototype.doHover = function(document, position, stylesheet, settings) { - if (settings === void 0) { - settings = this.defaultSettings; + return e.prototype.configure = function(t) { + this.defaultSettings = t; + }, e.prototype.doHover = function(t, n, r, i) { + i === void 0 && (i = this.defaultSettings); + function a(y) { + return Q.create(t.positionAt(y.offset), t.positionAt(y.end)); } - function getRange2(node2) { - return Range.create(document.positionAt(node2.offset), document.positionAt(node2.end)); - } - var offset = document.offsetAt(position); - var nodepath = getNodePath(stylesheet, offset); - var hover = null; - for (var i = 0; i < nodepath.length; i++) { - var node = nodepath[i]; - if (node instanceof Selector) { - hover = { - contents: this.selectorPrinting.selectorToMarkedString(node), - range: getRange2(node) + for (var o = t.offsetAt(n), l = ei(r, o), h = null, c = 0; c < l.length; c++) { + var d = l[c]; + if (d instanceof tn) { + h = { + contents: this.selectorPrinting.selectorToMarkedString(d), + range: a(d) }; break; } - if (node instanceof SimpleSelector) { - if (!startsWith(node.getText(), "@")) { - hover = { - contents: this.selectorPrinting.simpleSelectorToMarkedString(node), - range: getRange2(node) - }; - } - break; - } - if (node instanceof Declaration) { - var propertyName = node.getFullPropertyName(); - var entry = this.cssDataManager.getProperty(propertyName); - if (entry) { - var contents = getEntryDescription(entry, this.doesSupportMarkdown(), settings); - if (contents) { - hover = { - contents, - range: getRange2(node) - }; - } else { - hover = null; - } - } - continue; - } - if (node instanceof UnknownAtRule) { - var atRuleName = node.getText(); - var entry = this.cssDataManager.getAtDirective(atRuleName); - if (entry) { - var contents = getEntryDescription(entry, this.doesSupportMarkdown(), settings); - if (contents) { - hover = { - contents, - range: getRange2(node) - }; - } else { - hover = null; - } - } - continue; - } - if (node instanceof Node && node.type === NodeType.PseudoSelector) { - var selectorName = node.getText(); - var entry = selectorName.slice(0, 2) === "::" ? this.cssDataManager.getPseudoElement(selectorName) : this.cssDataManager.getPseudoClass(selectorName); - if (entry) { - var contents = getEntryDescription(entry, this.doesSupportMarkdown(), settings); - if (contents) { - hover = { - contents, - range: getRange2(node) - }; - } else { - hover = null; - } - } - continue; - } - } - if (hover) { - hover.contents = this.convertContents(hover.contents); - } - return hover; - }; - CSSHover2.prototype.convertContents = function(contents) { - if (!this.doesSupportMarkdown()) { - if (typeof contents === "string") { - return contents; - } else if ("kind" in contents) { - return { - kind: "plaintext", - value: contents.value - }; - } else if (Array.isArray(contents)) { - return contents.map(function(c) { - return typeof c === "string" ? c : c.value; + if (d instanceof kt) { + oe(d.getText(), "@") || (h = { + contents: this.selectorPrinting.simpleSelectorToMarkedString(d), + range: a(d) }); - } else { - return contents.value; + break; + } + if (d instanceof Ve) { + var p = d.getFullPropertyName(), f = this.cssDataManager.getProperty(p); + if (f) { + var g = et(f, this.doesSupportMarkdown(), i); + g ? h = { + contents: g, + range: a(d) + } : h = null; + } + continue; + } + if (d instanceof go) { + var w = d.getText(), f = this.cssDataManager.getAtDirective(w); + if (f) { + var g = et(f, this.doesSupportMarkdown(), i); + g ? h = { + contents: g, + range: a(d) + } : h = null; + } + continue; + } + if (d instanceof L && d.type === m.PseudoSelector) { + var b = d.getText(), f = b.slice(0, 2) === "::" ? this.cssDataManager.getPseudoElement(b) : this.cssDataManager.getPseudoClass(b); + if (f) { + var g = et(f, this.doesSupportMarkdown(), i); + g ? h = { + contents: g, + range: a(d) + } : h = null; + } + continue; } } - return contents; - }; - CSSHover2.prototype.doesSupportMarkdown = function() { - if (!isDefined(this.supportsMarkdown)) { - if (!isDefined(this.clientCapabilities)) { - this.supportsMarkdown = true; - return this.supportsMarkdown; - } - var hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover; - this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(MarkupKind.Markdown) !== -1; + return h && (h.contents = this.convertContents(h.contents)), h; + }, e.prototype.convertContents = function(t) { + return this.doesSupportMarkdown() || typeof t == "string" ? t : "kind" in t ? { + kind: "plaintext", + value: t.value + } : Array.isArray(t) ? t.map(function(n) { + return typeof n == "string" ? n : n.value; + }) : t.value; + }, e.prototype.doesSupportMarkdown = function() { + if (!Ee(this.supportsMarkdown)) { + if (!Ee(this.clientCapabilities)) + return this.supportsMarkdown = !0, this.supportsMarkdown; + var t = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover; + this.supportsMarkdown = t && t.contentFormat && Array.isArray(t.contentFormat) && t.contentFormat.indexOf(Ae.Markdown) !== -1; } return this.supportsMarkdown; - }; - return CSSHover2; -}(); -var __awaiter3 = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); + }, e; +}(), Lt = function(e, t, n, r) { + function i(a) { + return a instanceof n ? a : new n(function(o) { + o(a); }); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { + return new (n || (n = Promise))(function(a, o) { + function l(d) { try { - step(generator.next(value)); - } catch (e) { - reject(e); + c(r.next(d)); + } catch (p) { + o(p); } } - function rejected(value) { + function h(d) { try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + c(r.throw(d)); + } catch (p) { + o(p); } } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + function c(d) { + d.done ? a(d.value) : i(d.value).then(l, h); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + c((r = r.apply(e, t || [])).next()); }); -}; -var __generator3 = function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f2, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { +}, Tt = function(e, t) { + var n = { label: 0, sent: function() { + if (a[0] & 1) + throw a[1]; + return a[1]; + }, trys: [], ops: [] }, r, i, a, o; + return o = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() { return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); + }), o; + function l(c) { + return function(d) { + return h([c, d]); }; } - function step(op) { - if (f2) + function h(c) { + if (r) throw new TypeError("Generator is already executing."); - while (_) + for (; n; ) try { - if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) - return t; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { + if (r = 1, i && (a = c[0] & 2 ? i.return : c[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, c[1])).done) + return a; + switch (i = 0, a && (c = [c[0] & 2, a.value]), c[0]) { case 0: case 1: - t = op; + a = c; break; case 4: - _.label++; - return { value: op[1], done: false }; + return n.label++, { value: c[1], done: !1 }; case 5: - _.label++; - y = op[1]; - op = [0]; + n.label++, i = c[1], c = [0]; continue; case 7: - op = _.ops.pop(); - _.trys.pop(); + c = n.ops.pop(), n.trys.pop(); continue; default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; + if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (c[0] === 6 || c[0] === 2)) { + n = 0; continue; } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; + if (c[0] === 3 && (!a || c[1] > a[0] && c[1] < a[3])) { + n.label = c[1]; break; } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; + if (c[0] === 6 && n.label < a[1]) { + n.label = a[1], a = c; break; } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); + if (a && n.label < a[2]) { + n.label = a[2], n.ops.push(c); break; } - if (t[2]) - _.ops.pop(); - _.trys.pop(); + a[2] && n.ops.pop(), n.trys.pop(); continue; } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; + c = t.call(e, n); + } catch (d) { + c = [6, d], i = 0; } finally { - f2 = t = 0; + r = a = 0; } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; + if (c[0] & 5) + throw c[1]; + return { value: c[0] ? c[1] : void 0, done: !0 }; } -}; -var localize6 = loadMessageBundle(); -var startsWithSchemeRegex = /^\w+:\/\//; -var startsWithData = /^data:/; -var CSSNavigation = function() { - function CSSNavigation2(fileSystemProvider, resolveModuleReferences) { - this.fileSystemProvider = fileSystemProvider; - this.resolveModuleReferences = resolveModuleReferences; +}, Ms = Le(), Ns = /^\w+:\/\//, Ps = /^data:/, fi = function() { + function e(t, n) { + this.fileSystemProvider = t, this.resolveModuleReferences = n; } - CSSNavigation2.prototype.findDefinition = function(document, position, stylesheet) { - var symbols = new Symbols(stylesheet); - var offset = document.offsetAt(position); - var node = getNodeAtOffset(stylesheet, offset); - if (!node) { + return e.prototype.findDefinition = function(t, n, r) { + var i = new Ur(r), a = t.offsetAt(n), o = Rr(r, a); + if (!o) return null; - } - var symbol = symbols.findSymbolFromNode(node); - if (!symbol) { - return null; - } - return { - uri: document.uri, - range: getRange(symbol.node, document) - }; - }; - CSSNavigation2.prototype.findReferences = function(document, position, stylesheet) { - var highlights = this.findDocumentHighlights(document, position, stylesheet); - return highlights.map(function(h) { + var l = i.findSymbolFromNode(o); + return l ? { + uri: t.uri, + range: st(l.node, t) + } : null; + }, e.prototype.findReferences = function(t, n, r) { + var i = this.findDocumentHighlights(t, n, r); + return i.map(function(a) { return { - uri: document.uri, - range: h.range + uri: t.uri, + range: a.range }; }); - }; - CSSNavigation2.prototype.findDocumentHighlights = function(document, position, stylesheet) { - var result = []; - var offset = document.offsetAt(position); - var node = getNodeAtOffset(stylesheet, offset); - if (!node || node.type === NodeType.Stylesheet || node.type === NodeType.Declarations) { - return result; - } - if (node.type === NodeType.Identifier && node.parent && node.parent.type === NodeType.ClassSelector) { - node = node.parent; - } - var symbols = new Symbols(stylesheet); - var symbol = symbols.findSymbolFromNode(node); - var name = node.getText(); - stylesheet.accept(function(candidate) { - if (symbol) { - if (symbols.matchesSymbol(candidate, symbol)) { - result.push({ - kind: getHighlightKind(candidate), - range: getRange(candidate, document) - }); - return false; - } - } else if (node && node.type === candidate.type && candidate.matches(name)) { - result.push({ - kind: getHighlightKind(candidate), - range: getRange(candidate, document) + }, e.prototype.findDocumentHighlights = function(t, n, r) { + var i = [], a = t.offsetAt(n), o = Rr(r, a); + if (!o || o.type === m.Stylesheet || o.type === m.Declarations) + return i; + o.type === m.Identifier && o.parent && o.parent.type === m.ClassSelector && (o = o.parent); + var l = new Ur(r), h = l.findSymbolFromNode(o), c = o.getText(); + return r.accept(function(d) { + if (h) { + if (l.matchesSymbol(d, h)) + return i.push({ + kind: Is(d), + range: st(d, t) + }), !1; + } else + o && o.type === d.type && d.matches(c) && i.push({ + kind: Is(d), + range: st(d, t) }); - } - return true; - }); - return result; - }; - CSSNavigation2.prototype.isRawStringDocumentLinkNode = function(node) { - return node.type === NodeType.Import; - }; - CSSNavigation2.prototype.findDocumentLinks = function(document, stylesheet, documentContext) { - var linkData = this.findUnresolvedLinks(document, stylesheet); - var resolvedLinks = []; - for (var _i = 0, linkData_1 = linkData; _i < linkData_1.length; _i++) { - var data = linkData_1[_i]; - var link = data.link; - var target = link.target; - if (!target || startsWithData.test(target)) - ; - else if (startsWithSchemeRegex.test(target)) { - resolvedLinks.push(link); - } else { - var resolved = documentContext.resolveReference(target, document.uri); - if (resolved) { - link.target = resolved; + return !0; + }), i; + }, e.prototype.isRawStringDocumentLinkNode = function(t) { + return t.type === m.Import; + }, e.prototype.findDocumentLinks = function(t, n, r) { + for (var i = this.findUnresolvedLinks(t, n), a = [], o = 0, l = i; o < l.length; o++) { + var h = l[o], c = h.link, d = c.target; + if (!(!d || Ps.test(d))) + if (Ns.test(d)) + a.push(c); + else { + var p = r.resolveReference(d, t.uri); + p && (c.target = p), a.push(c); } - resolvedLinks.push(link); - } } - return resolvedLinks; - }; - CSSNavigation2.prototype.findDocumentLinks2 = function(document, stylesheet, documentContext) { - return __awaiter3(this, void 0, void 0, function() { - var linkData, resolvedLinks, _i, linkData_2, data, link, target, resolvedTarget; - return __generator3(this, function(_a2) { - switch (_a2.label) { + return a; + }, e.prototype.findDocumentLinks2 = function(t, n, r) { + return Lt(this, void 0, void 0, function() { + var i, a, o, l, h, c, d, p; + return Tt(this, function(f) { + switch (f.label) { case 0: - linkData = this.findUnresolvedLinks(document, stylesheet); - resolvedLinks = []; - _i = 0, linkData_2 = linkData; - _a2.label = 1; + i = this.findUnresolvedLinks(t, n), a = [], o = 0, l = i, f.label = 1; case 1: - if (!(_i < linkData_2.length)) - return [3, 6]; - data = linkData_2[_i]; - link = data.link; - target = link.target; - if (!(!target || startsWithData.test(target))) - return [3, 2]; - return [3, 5]; + return o < l.length ? (h = l[o], c = h.link, d = c.target, !d || Ps.test(d) ? [3, 5] : [3, 2]) : [3, 6]; case 2: - if (!startsWithSchemeRegex.test(target)) - return [3, 3]; - resolvedLinks.push(link); - return [3, 5]; + return Ns.test(d) ? (a.push(c), [3, 5]) : [3, 3]; case 3: - return [4, this.resolveRelativeReference(target, document.uri, documentContext, data.isRawLink)]; + return [4, this.resolveRelativeReference(d, t.uri, r, h.isRawLink)]; case 4: - resolvedTarget = _a2.sent(); - if (resolvedTarget !== void 0) { - link.target = resolvedTarget; - resolvedLinks.push(link); - } - _a2.label = 5; + p = f.sent(), p !== void 0 && (c.target = p, a.push(c)), f.label = 5; case 5: - _i++; - return [3, 1]; + return o++, [3, 1]; case 6: - return [2, resolvedLinks]; + return [2, a]; } }); }); - }; - CSSNavigation2.prototype.findUnresolvedLinks = function(document, stylesheet) { - var _this = this; - var result = []; - var collect = function(uriStringNode) { - var rawUri = uriStringNode.getText(); - var range = getRange(uriStringNode, document); - if (range.start.line === range.end.line && range.start.character === range.end.character) { - return; + }, e.prototype.findUnresolvedLinks = function(t, n) { + var r = this, i = [], a = function(o) { + var l = o.getText(), h = st(o, t); + if (!(h.start.line === h.end.line && h.start.character === h.end.character)) { + (oe(l, "'") || oe(l, '"')) && (l = l.slice(1, -1)); + var c = o.parent ? r.isRawStringDocumentLinkNode(o.parent) : !1; + i.push({ link: { target: l, range: h }, isRawLink: c }); } - if (startsWith(rawUri, "'") || startsWith(rawUri, '"')) { - rawUri = rawUri.slice(1, -1); - } - var isRawLink = uriStringNode.parent ? _this.isRawStringDocumentLinkNode(uriStringNode.parent) : false; - result.push({ link: { target: rawUri, range }, isRawLink }); }; - stylesheet.accept(function(candidate) { - if (candidate.type === NodeType.URILiteral) { - var first = candidate.getChild(0); - if (first) { - collect(first); - } - return false; + return n.accept(function(o) { + if (o.type === m.URILiteral) { + var l = o.getChild(0); + return l && a(l), !1; } - if (candidate.parent && _this.isRawStringDocumentLinkNode(candidate.parent)) { - var rawText = candidate.getText(); - if (startsWith(rawText, "'") || startsWith(rawText, '"')) { - collect(candidate); - } - return false; + if (o.parent && r.isRawStringDocumentLinkNode(o.parent)) { + var h = o.getText(); + return (oe(h, "'") || oe(h, '"')) && a(o), !1; } - return true; - }); - return result; - }; - CSSNavigation2.prototype.findDocumentSymbols = function(document, stylesheet) { - var result = []; - stylesheet.accept(function(node) { - var entry = { + return !0; + }), i; + }, e.prototype.findDocumentSymbols = function(t, n) { + var r = []; + return n.accept(function(i) { + var a = { name: null, - kind: SymbolKind.Class, + kind: lt.Class, location: null - }; - var locationNode = node; - if (node instanceof Selector) { - entry.name = node.getText(); - locationNode = node.findAParent(NodeType.Ruleset, NodeType.ExtendsReference); - if (locationNode) { - entry.location = Location.create(document.uri, getRange(locationNode, document)); - result.push(entry); - } - return false; - } else if (node instanceof VariableDeclaration) { - entry.name = node.getName(); - entry.kind = SymbolKind.Variable; - } else if (node instanceof MixinDeclaration) { - entry.name = node.getName(); - entry.kind = SymbolKind.Method; - } else if (node instanceof FunctionDeclaration) { - entry.name = node.getName(); - entry.kind = SymbolKind.Function; - } else if (node instanceof Keyframe) { - entry.name = localize6("literal.keyframes", "@keyframes {0}", node.getName()); - } else if (node instanceof FontFace) { - entry.name = localize6("literal.fontface", "@font-face"); - } else if (node instanceof Media) { - var mediaList = node.getChild(0); - if (mediaList instanceof Medialist) { - entry.name = "@media " + mediaList.getText(); - entry.kind = SymbolKind.Module; - } + }, o = i; + if (i instanceof tn) + return a.name = i.getText(), o = i.findAParent(m.Ruleset, m.ExtendsReference), o && (a.location = Ht.create(t.uri, st(o, t)), r.push(a)), !1; + if (i instanceof Vn) + a.name = i.getName(), a.kind = lt.Variable; + else if (i instanceof $t) + a.name = i.getName(), a.kind = lt.Method; + else if (i instanceof kn) + a.name = i.getName(), a.kind = lt.Function; + else if (i instanceof ho) + a.name = Ms("literal.keyframes", "@keyframes {0}", i.getName()); + else if (i instanceof lo) + a.name = Ms("literal.fontface", "@font-face"); + else if (i instanceof uo) { + var l = i.getChild(0); + l instanceof po && (a.name = "@media " + l.getText(), a.kind = lt.Module); } - if (entry.name) { - entry.location = Location.create(document.uri, getRange(locationNode, document)); - result.push(entry); - } - return true; - }); - return result; - }; - CSSNavigation2.prototype.findDocumentColors = function(document, stylesheet) { - var result = []; - stylesheet.accept(function(node) { - var colorInfo = getColorInformation(node, document); - if (colorInfo) { - result.push(colorInfo); - } - return true; - }); - return result; - }; - CSSNavigation2.prototype.getColorPresentations = function(document, stylesheet, color, range) { - var result = []; - var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255); - var label; - if (color.alpha === 1) { - label = "rgb(".concat(red256, ", ").concat(green256, ", ").concat(blue256, ")"); - } else { - label = "rgba(".concat(red256, ", ").concat(green256, ", ").concat(blue256, ", ").concat(color.alpha, ")"); - } - result.push({ label, textEdit: TextEdit.replace(range, label) }); - if (color.alpha === 1) { - label = "#".concat(toTwoDigitHex(red256)).concat(toTwoDigitHex(green256)).concat(toTwoDigitHex(blue256)); - } else { - label = "#".concat(toTwoDigitHex(red256)).concat(toTwoDigitHex(green256)).concat(toTwoDigitHex(blue256)).concat(toTwoDigitHex(Math.round(color.alpha * 255))); - } - result.push({ label, textEdit: TextEdit.replace(range, label) }); - var hsl = hslFromColor(color); - if (hsl.a === 1) { - label = "hsl(".concat(hsl.h, ", ").concat(Math.round(hsl.s * 100), "%, ").concat(Math.round(hsl.l * 100), "%)"); - } else { - label = "hsla(".concat(hsl.h, ", ").concat(Math.round(hsl.s * 100), "%, ").concat(Math.round(hsl.l * 100), "%, ").concat(hsl.a, ")"); - } - result.push({ label, textEdit: TextEdit.replace(range, label) }); - return result; - }; - CSSNavigation2.prototype.doRename = function(document, position, newName, stylesheet) { - var _a2; - var highlights = this.findDocumentHighlights(document, position, stylesheet); - var edits = highlights.map(function(h) { - return TextEdit.replace(h.range, newName); + return a.name && (a.location = Ht.create(t.uri, st(o, t)), r.push(a)), !0; + }), r; + }, e.prototype.findDocumentColors = function(t, n) { + var r = []; + return n.accept(function(i) { + var a = ed(i, t); + return a && r.push(a), !0; + }), r; + }, e.prototype.getColorPresentations = function(t, n, r, i) { + var a = [], o = Math.round(r.red * 255), l = Math.round(r.green * 255), h = Math.round(r.blue * 255), c; + r.alpha === 1 ? c = "rgb(".concat(o, ", ").concat(l, ", ").concat(h, ")") : c = "rgba(".concat(o, ", ").concat(l, ", ").concat(h, ", ").concat(r.alpha, ")"), a.push({ label: c, textEdit: B.replace(i, c) }), r.alpha === 1 ? c = "#".concat(at(o)).concat(at(l)).concat(at(h)) : c = "#".concat(at(o)).concat(at(l)).concat(at(h)).concat(at(Math.round(r.alpha * 255))), a.push({ label: c, textEdit: B.replace(i, c) }); + var d = Fh(r); + return d.a === 1 ? c = "hsl(".concat(d.h, ", ").concat(Math.round(d.s * 100), "%, ").concat(Math.round(d.l * 100), "%)") : c = "hsla(".concat(d.h, ", ").concat(Math.round(d.s * 100), "%, ").concat(Math.round(d.l * 100), "%, ").concat(d.a, ")"), a.push({ label: c, textEdit: B.replace(i, c) }), a; + }, e.prototype.doRename = function(t, n, r, i) { + var a, o = this.findDocumentHighlights(t, n, i), l = o.map(function(h) { + return B.replace(h.range, r); }); return { - changes: (_a2 = {}, _a2[document.uri] = edits, _a2) + changes: (a = {}, a[t.uri] = l, a) }; - }; - CSSNavigation2.prototype.resolveModuleReference = function(ref, documentUri, documentContext) { - return __awaiter3(this, void 0, void 0, function() { - var moduleName, rootFolderUri, documentFolderUri, modulePath, pathWithinModule; - return __generator3(this, function(_a2) { - switch (_a2.label) { + }, e.prototype.resolveModuleReference = function(t, n, r) { + return Lt(this, void 0, void 0, function() { + var i, a, o, l, h; + return Tt(this, function(c) { + switch (c.label) { case 0: - if (!startsWith(documentUri, "file://")) - return [3, 2]; - moduleName = getModuleNameFromPath(ref); - rootFolderUri = documentContext.resolveReference("/", documentUri); - documentFolderUri = dirname(documentUri); - return [4, this.resolvePathToModule(moduleName, documentFolderUri, rootFolderUri)]; + return oe(n, "file://") ? (i = td(t), a = r.resolveReference("/", n), o = Zn(n), [4, this.resolvePathToModule(i, o, a)]) : [3, 2]; case 1: - modulePath = _a2.sent(); - if (modulePath) { - pathWithinModule = ref.substring(moduleName.length + 1); - return [2, joinPath(modulePath, pathWithinModule)]; - } - _a2.label = 2; + if (l = c.sent(), l) + return h = t.substring(i.length + 1), [2, jr(l, h)]; + c.label = 2; case 2: return [2, void 0]; } }); }); - }; - CSSNavigation2.prototype.resolveRelativeReference = function(ref, documentUri, documentContext, isRawLink) { - return __awaiter3(this, void 0, void 0, function() { - var relativeReference, _a2; - return __generator3(this, function(_b) { - switch (_b.label) { + }, e.prototype.resolveRelativeReference = function(t, n, r, i) { + return Lt(this, void 0, void 0, function() { + var a, o; + return Tt(this, function(l) { + switch (l.label) { case 0: - relativeReference = documentContext.resolveReference(ref, documentUri); - if (!(ref[0] === "~" && ref[1] !== "/" && this.fileSystemProvider)) - return [3, 2]; - ref = ref.substring(1); - return [4, this.resolveModuleReference(ref, documentUri, documentContext)]; + return a = r.resolveReference(t, n), t[0] === "~" && t[1] !== "/" && this.fileSystemProvider ? (t = t.substring(1), [4, this.resolveModuleReference(t, n, r)]) : [3, 2]; case 1: - return [2, _b.sent() || relativeReference]; + return [2, l.sent() || a]; case 2: - if (!this.resolveModuleReferences) - return [3, 7]; - _a2 = relativeReference; - if (!_a2) - return [3, 4]; - return [4, this.fileExists(relativeReference)]; + return this.resolveModuleReferences ? (o = a, o ? [4, this.fileExists(a)] : [3, 4]) : [3, 7]; case 3: - _a2 = _b.sent(); - _b.label = 4; + o = l.sent(), l.label = 4; case 4: - if (!_a2) - return [3, 5]; - return [2, relativeReference]; + return o ? [2, a] : [3, 5]; case 5: - return [4, this.resolveModuleReference(ref, documentUri, documentContext)]; + return [4, this.resolveModuleReference(t, n, r)]; case 6: - return [2, _b.sent() || relativeReference]; + return [2, l.sent() || a]; case 7: - return [2, relativeReference]; + return [2, a]; } }); }); - }; - CSSNavigation2.prototype.resolvePathToModule = function(_moduleName, documentFolderUri, rootFolderUri) { - return __awaiter3(this, void 0, void 0, function() { - var packPath; - return __generator3(this, function(_a2) { - switch (_a2.label) { + }, e.prototype.resolvePathToModule = function(t, n, r) { + return Lt(this, void 0, void 0, function() { + var i; + return Tt(this, function(a) { + switch (a.label) { case 0: - packPath = joinPath(documentFolderUri, "node_modules", _moduleName, "package.json"); - return [4, this.fileExists(packPath)]; + return i = jr(n, "node_modules", t, "package.json"), [4, this.fileExists(i)]; case 1: - if (_a2.sent()) { - return [2, dirname(packPath)]; - } else if (rootFolderUri && documentFolderUri.startsWith(rootFolderUri) && documentFolderUri.length !== rootFolderUri.length) { - return [2, this.resolvePathToModule(_moduleName, dirname(documentFolderUri), rootFolderUri)]; - } - return [2, void 0]; + return a.sent() ? [2, Zn(i)] : r && n.startsWith(r) && n.length !== r.length ? [2, this.resolvePathToModule(t, Zn(n), r)] : [2, void 0]; } }); }); - }; - CSSNavigation2.prototype.fileExists = function(uri) { - return __awaiter3(this, void 0, void 0, function() { - var stat; - return __generator3(this, function(_a2) { - switch (_a2.label) { + }, e.prototype.fileExists = function(t) { + return Lt(this, void 0, void 0, function() { + var n; + return Tt(this, function(r) { + switch (r.label) { case 0: - if (!this.fileSystemProvider) { - return [2, false]; - } - _a2.label = 1; + if (!this.fileSystemProvider) + return [2, !1]; + r.label = 1; case 1: - _a2.trys.push([1, 3, , 4]); - return [4, this.fileSystemProvider.stat(uri)]; + return r.trys.push([1, 3, , 4]), [4, this.fileSystemProvider.stat(t)]; case 2: - stat = _a2.sent(); - if (stat.type === FileType.Unknown && stat.size === -1) { - return [2, false]; - } - return [2, true]; + return n = r.sent(), n.type === Kt.Unknown && n.size === -1 ? [2, !1] : [2, !0]; case 3: - _a2.sent(); - return [2, false]; + return r.sent(), [2, !1]; case 4: return [2]; } }); }); - }; - return CSSNavigation2; + }, e; }(); -function getColorInformation(node, document) { - var color = getColorValue(node); - if (color) { - var range = getRange(node, document); - return { color, range }; +function ed(e, t) { + var n = _h(e); + if (n) { + var r = st(e, t); + return { color: n, range: r }; } return null; } -function getRange(node, document) { - return Range.create(document.positionAt(node.offset), document.positionAt(node.end)); +function st(e, t) { + return Q.create(t.positionAt(e.offset), t.positionAt(e.end)); } -function getHighlightKind(node) { - if (node.type === NodeType.Selector) { - return DocumentHighlightKind.Write; - } - if (node instanceof Identifier) { - if (node.parent && node.parent instanceof Property) { - if (node.isCustomProperty) { - return DocumentHighlightKind.Write; - } +function Is(e) { + if (e.type === m.Selector || e instanceof Re && e.parent && e.parent instanceof ri && e.isCustomProperty) + return xt.Write; + if (e.parent) + switch (e.parent.type) { + case m.FunctionDeclaration: + case m.MixinDeclaration: + case m.Keyframe: + case m.VariableDeclaration: + case m.FunctionParameter: + return xt.Write; } + return xt.Read; +} +function at(e) { + var t = e.toString(16); + return t.length !== 2 ? "0" + t : t; +} +function td(e) { + return e[0] === "@" ? e.substring(0, e.indexOf("/", e.indexOf("/") + 1)) : e.substring(0, e.indexOf("/")); +} +var se = Le(), wt = _e.Warning, Ls = _e.Error, Pe = _e.Ignore, ce = function() { + function e(t, n, r) { + this.id = t, this.message = n, this.defaultValue = r; } - if (node.parent) { - switch (node.parent.type) { - case NodeType.FunctionDeclaration: - case NodeType.MixinDeclaration: - case NodeType.Keyframe: - case NodeType.VariableDeclaration: - case NodeType.FunctionParameter: - return DocumentHighlightKind.Write; + return e; +}(), nd = function() { + function e(t, n, r) { + this.id = t, this.message = n, this.defaultValue = r; + } + return e; +}(), K = { + AllVendorPrefixes: new ce("compatibleVendorPrefixes", se("rule.vendorprefixes.all", "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), Pe), + IncludeStandardPropertyWhenUsingVendorPrefix: new ce("vendorPrefix", se("rule.standardvendorprefix.all", "When using a vendor-specific prefix also include the standard property"), wt), + DuplicateDeclarations: new ce("duplicateProperties", se("rule.duplicateDeclarations", "Do not use duplicate style definitions"), Pe), + EmptyRuleSet: new ce("emptyRules", se("rule.emptyRuleSets", "Do not use empty rulesets"), wt), + ImportStatemement: new ce("importStatement", se("rule.importDirective", "Import statements do not load in parallel"), Pe), + BewareOfBoxModelSize: new ce("boxModel", se("rule.bewareOfBoxModelSize", "Do not use width or height when using padding or border"), Pe), + UniversalSelector: new ce("universalSelector", se("rule.universalSelector", "The universal selector (*) is known to be slow"), Pe), + ZeroWithUnit: new ce("zeroUnits", se("rule.zeroWidthUnit", "No unit for zero needed"), Pe), + RequiredPropertiesForFontFace: new ce("fontFaceProperties", se("rule.fontFaceProperties", "@font-face rule must define 'src' and 'font-family' properties"), wt), + HexColorLength: new ce("hexColorLength", se("rule.hexColor", "Hex colors must consist of three, four, six or eight hex numbers"), Ls), + ArgsInColorFunction: new ce("argumentsInColorFunction", se("rule.colorFunction", "Invalid number of parameters"), Ls), + UnknownProperty: new ce("unknownProperties", se("rule.unknownProperty", "Unknown property."), wt), + UnknownAtRules: new ce("unknownAtRules", se("rule.unknownAtRules", "Unknown at-rule."), wt), + IEStarHack: new ce("ieHack", se("rule.ieHack", "IE hacks are only necessary when supporting IE7 and older"), Pe), + UnknownVendorSpecificProperty: new ce("unknownVendorSpecificProperties", se("rule.unknownVendorSpecificProperty", "Unknown vendor specific property."), Pe), + PropertyIgnoredDueToDisplay: new ce("propertyIgnoredDueToDisplay", se("rule.propertyIgnoredDueToDisplay", "Property is ignored due to the display."), wt), + AvoidImportant: new ce("important", se("rule.avoidImportant", "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), Pe), + AvoidFloat: new ce("float", se("rule.avoidFloat", "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), Pe), + AvoidIdSelector: new ce("idSelector", se("rule.avoidIdSelector", "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Pe) +}, rd = { + ValidProperties: new nd("validProperties", se("rule.validProperties", "A list of properties that are not validated against the `unknownProperties` rule."), []) +}, id = function() { + function e(t) { + t === void 0 && (t = {}), this.conf = t; + } + return e.prototype.getRule = function(t) { + if (this.conf.hasOwnProperty(t.id)) { + var n = ad(this.conf[t.id]); + if (n) + return n; } - } - return DocumentHighlightKind.Read; -} -function toTwoDigitHex(n) { - var r = n.toString(16); - return r.length !== 2 ? "0" + r : r; -} -function getModuleNameFromPath(path) { - if (path[0] === "@") { - return path.substring(0, path.indexOf("/", path.indexOf("/") + 1)); - } - return path.substring(0, path.indexOf("/")); -} -var localize7 = loadMessageBundle(); -var Warning = Level.Warning; -var Error2 = Level.Error; -var Ignore = Level.Ignore; -var Rule = function() { - function Rule2(id, message, defaultValue) { - this.id = id; - this.message = message; - this.defaultValue = defaultValue; - } - return Rule2; + return t.defaultValue; + }, e.prototype.getSetting = function(t) { + return this.conf[t.id]; + }, e; }(); -var Setting = function() { - function Setting2(id, message, defaultValue) { - this.id = id; - this.message = message; - this.defaultValue = defaultValue; - } - return Setting2; -}(); -var Rules = { - AllVendorPrefixes: new Rule("compatibleVendorPrefixes", localize7("rule.vendorprefixes.all", "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), Ignore), - IncludeStandardPropertyWhenUsingVendorPrefix: new Rule("vendorPrefix", localize7("rule.standardvendorprefix.all", "When using a vendor-specific prefix also include the standard property"), Warning), - DuplicateDeclarations: new Rule("duplicateProperties", localize7("rule.duplicateDeclarations", "Do not use duplicate style definitions"), Ignore), - EmptyRuleSet: new Rule("emptyRules", localize7("rule.emptyRuleSets", "Do not use empty rulesets"), Warning), - ImportStatemement: new Rule("importStatement", localize7("rule.importDirective", "Import statements do not load in parallel"), Ignore), - BewareOfBoxModelSize: new Rule("boxModel", localize7("rule.bewareOfBoxModelSize", "Do not use width or height when using padding or border"), Ignore), - UniversalSelector: new Rule("universalSelector", localize7("rule.universalSelector", "The universal selector (*) is known to be slow"), Ignore), - ZeroWithUnit: new Rule("zeroUnits", localize7("rule.zeroWidthUnit", "No unit for zero needed"), Ignore), - RequiredPropertiesForFontFace: new Rule("fontFaceProperties", localize7("rule.fontFaceProperties", "@font-face rule must define 'src' and 'font-family' properties"), Warning), - HexColorLength: new Rule("hexColorLength", localize7("rule.hexColor", "Hex colors must consist of three, four, six or eight hex numbers"), Error2), - ArgsInColorFunction: new Rule("argumentsInColorFunction", localize7("rule.colorFunction", "Invalid number of parameters"), Error2), - UnknownProperty: new Rule("unknownProperties", localize7("rule.unknownProperty", "Unknown property."), Warning), - UnknownAtRules: new Rule("unknownAtRules", localize7("rule.unknownAtRules", "Unknown at-rule."), Warning), - IEStarHack: new Rule("ieHack", localize7("rule.ieHack", "IE hacks are only necessary when supporting IE7 and older"), Ignore), - UnknownVendorSpecificProperty: new Rule("unknownVendorSpecificProperties", localize7("rule.unknownVendorSpecificProperty", "Unknown vendor specific property."), Ignore), - PropertyIgnoredDueToDisplay: new Rule("propertyIgnoredDueToDisplay", localize7("rule.propertyIgnoredDueToDisplay", "Property is ignored due to the display."), Warning), - AvoidImportant: new Rule("important", localize7("rule.avoidImportant", "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), Ignore), - AvoidFloat: new Rule("float", localize7("rule.avoidFloat", "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), Ignore), - AvoidIdSelector: new Rule("idSelector", localize7("rule.avoidIdSelector", "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Ignore) -}; -var Settings = { - ValidProperties: new Setting("validProperties", localize7("rule.validProperties", "A list of properties that are not validated against the `unknownProperties` rule."), []) -}; -var LintConfigurationSettings = function() { - function LintConfigurationSettings2(conf) { - if (conf === void 0) { - conf = {}; - } - this.conf = conf; - } - LintConfigurationSettings2.prototype.getRule = function(rule) { - if (this.conf.hasOwnProperty(rule.id)) { - var level = toLevel(this.conf[rule.id]); - if (level) { - return level; - } - } - return rule.defaultValue; - }; - LintConfigurationSettings2.prototype.getSetting = function(setting) { - return this.conf[setting.id]; - }; - return LintConfigurationSettings2; -}(); -function toLevel(level) { - switch (level) { +function ad(e) { + switch (e) { case "ignore": - return Level.Ignore; + return _e.Ignore; case "warning": - return Level.Warning; + return _e.Warning; case "error": - return Level.Error; + return _e.Error; } return null; } -var localize8 = loadMessageBundle(); -var CSSCodeActions = function() { - function CSSCodeActions2(cssDataManager) { - this.cssDataManager = cssDataManager; +var sd = Le(), mi = function() { + function e(t) { + this.cssDataManager = t; } - CSSCodeActions2.prototype.doCodeActions = function(document, range, context, stylesheet) { - return this.doCodeActions2(document, range, context, stylesheet).map(function(ca) { - var textDocumentEdit = ca.edit && ca.edit.documentChanges && ca.edit.documentChanges[0]; - return Command.create(ca.title, "_css.applyCodeAction", document.uri, document.version, textDocumentEdit && textDocumentEdit.edits); + return e.prototype.doCodeActions = function(t, n, r, i) { + return this.doCodeActions2(t, n, r, i).map(function(a) { + var o = a.edit && a.edit.documentChanges && a.edit.documentChanges[0]; + return Et.create(a.title, "_css.applyCodeAction", t.uri, t.version, o && o.edits); }); - }; - CSSCodeActions2.prototype.doCodeActions2 = function(document, range, context, stylesheet) { - var result = []; - if (context.diagnostics) { - for (var _i = 0, _a2 = context.diagnostics; _i < _a2.length; _i++) { - var diagnostic = _a2[_i]; - this.appendFixesForMarker(document, stylesheet, diagnostic, result); - } - } - return result; - }; - CSSCodeActions2.prototype.getFixesForUnknownProperty = function(document, property, marker, result) { - var propertyName = property.getName(); - var candidates = []; - this.cssDataManager.getProperties().forEach(function(p) { - var score = difference(propertyName, p.name); - if (score >= propertyName.length / 2) { - candidates.push({ property: p.name, score }); + }, e.prototype.doCodeActions2 = function(t, n, r, i) { + var a = []; + if (r.diagnostics) + for (var o = 0, l = r.diagnostics; o < l.length; o++) { + var h = l[o]; + this.appendFixesForMarker(t, i, h, a); } + return a; + }, e.prototype.getFixesForUnknownProperty = function(t, n, r, i) { + var a = n.getName(), o = []; + this.cssDataManager.getProperties().forEach(function(A) { + var C = zc(a, A.name); + C >= a.length / 2 && o.push({ property: A.name, score: C }); + }), o.sort(function(A, C) { + return C.score - A.score || A.property.localeCompare(C.property); }); - candidates.sort(function(a2, b) { - return b.score - a2.score || a2.property.localeCompare(b.property); - }); - var maxActions = 3; - for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) { - var candidate = candidates_1[_i]; - var propertyName_1 = candidate.property; - var title = localize8("css.codeaction.rename", "Rename to '{0}'", propertyName_1); - var edit = TextEdit.replace(marker.range, propertyName_1); - var documentIdentifier = VersionedTextDocumentIdentifier.create(document.uri, document.version); - var workspaceEdit = { documentChanges: [TextDocumentEdit.create(documentIdentifier, [edit])] }; - var codeAction = CodeAction.create(title, workspaceEdit, CodeActionKind.QuickFix); - codeAction.diagnostics = [marker]; - result.push(codeAction); - if (--maxActions <= 0) { + for (var l = 3, h = 0, c = o; h < c.length; h++) { + var d = c[h], p = d.property, f = sd("css.codeaction.rename", "Rename to '{0}'", p), g = B.replace(r.range, p), w = Ir.create(t.uri, t.version), b = { documentChanges: [Gt.create(w, [g])] }, y = Wr.create(f, b, Tr.QuickFix); + if (y.diagnostics = [r], i.push(y), --l <= 0) return; - } } - }; - CSSCodeActions2.prototype.appendFixesForMarker = function(document, stylesheet, marker, result) { - if (marker.code !== Rules.UnknownProperty.id) { - return; - } - var offset = document.offsetAt(marker.range.start); - var end = document.offsetAt(marker.range.end); - var nodepath = getNodePath(stylesheet, offset); - for (var i = nodepath.length - 1; i >= 0; i--) { - var node = nodepath[i]; - if (node instanceof Declaration) { - var property = node.getProperty(); - if (property && property.offset === offset && property.end === end) { - this.getFixesForUnknownProperty(document, property, marker, result); - return; + }, e.prototype.appendFixesForMarker = function(t, n, r, i) { + if (r.code === K.UnknownProperty.id) + for (var a = t.offsetAt(r.range.start), o = t.offsetAt(r.range.end), l = ei(n, a), h = l.length - 1; h >= 0; h--) { + var c = l[h]; + if (c instanceof Ve) { + var d = c.getProperty(); + if (d && d.offset === a && d.end === o) { + this.getFixesForUnknownProperty(t, d, r, i); + return; + } } } - } - }; - return CSSCodeActions2; + }, e; +}(), od = function() { + function e(t) { + this.fullPropertyName = t.getFullPropertyName().toLowerCase(), this.node = t; + } + return e; }(); -var Element2 = function() { - function Element3(decl) { - this.fullPropertyName = decl.getFullPropertyName().toLowerCase(); - this.node = decl; - } - return Element3; -}(); -function setSide(model, side, value, property) { - var state = model[side]; - state.value = value; - if (value) { - if (!includes(state.properties, property)) { - state.properties.push(property); - } - } +function Ot(e, t, n, r) { + var i = e[t]; + i.value = n, n && (So(i.properties, r) || i.properties.push(r)); } -function setAllSides(model, value, property) { - setSide(model, "top", value, property); - setSide(model, "right", value, property); - setSide(model, "bottom", value, property); - setSide(model, "left", value, property); +function ld(e, t, n) { + Ot(e, "top", t, n), Ot(e, "right", t, n), Ot(e, "bottom", t, n), Ot(e, "left", t, n); } -function updateModelWithValue(model, side, value, property) { - if (side === "top" || side === "right" || side === "bottom" || side === "left") { - setSide(model, side, value, property); - } else { - setAllSides(model, value, property); - } +function ue(e, t, n, r) { + t === "top" || t === "right" || t === "bottom" || t === "left" ? Ot(e, t, n, r) : ld(e, n, r); } -function updateModelWithList(model, values2, property) { - switch (values2.length) { +function er(e, t, n) { + switch (t.length) { case 1: - updateModelWithValue(model, void 0, values2[0], property); + ue(e, void 0, t[0], n); break; case 2: - updateModelWithValue(model, "top", values2[0], property); - updateModelWithValue(model, "bottom", values2[0], property); - updateModelWithValue(model, "right", values2[1], property); - updateModelWithValue(model, "left", values2[1], property); + ue(e, "top", t[0], n), ue(e, "bottom", t[0], n), ue(e, "right", t[1], n), ue(e, "left", t[1], n); break; case 3: - updateModelWithValue(model, "top", values2[0], property); - updateModelWithValue(model, "right", values2[1], property); - updateModelWithValue(model, "left", values2[1], property); - updateModelWithValue(model, "bottom", values2[2], property); + ue(e, "top", t[0], n), ue(e, "right", t[1], n), ue(e, "left", t[1], n), ue(e, "bottom", t[2], n); break; case 4: - updateModelWithValue(model, "top", values2[0], property); - updateModelWithValue(model, "right", values2[1], property); - updateModelWithValue(model, "bottom", values2[2], property); - updateModelWithValue(model, "left", values2[3], property); + ue(e, "top", t[0], n), ue(e, "right", t[1], n), ue(e, "bottom", t[2], n), ue(e, "left", t[3], n); break; } } -function matches(value, candidates) { - for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) { - var candidate = candidates_1[_i]; - if (value.matches(candidate)) { - return true; - } +function Hr(e, t) { + for (var n = 0, r = t; n < r.length; n++) { + var i = r[n]; + if (e.matches(i)) + return !0; } - return false; + return !1; } -function checkLineWidth(value, allowsKeywords) { - if (allowsKeywords === void 0) { - allowsKeywords = true; - } - if (allowsKeywords && matches(value, ["initial", "unset"])) { - return false; - } - return parseFloat(value.getText()) !== 0; +function Zt(e, t) { + return t === void 0 && (t = !0), t && Hr(e, ["initial", "unset"]) ? !1 : parseFloat(e.getText()) !== 0; } -function checkLineWidthList(nodes, allowsKeywords) { - if (allowsKeywords === void 0) { - allowsKeywords = true; - } - return nodes.map(function(node) { - return checkLineWidth(node, allowsKeywords); +function Ts(e, t) { + return t === void 0 && (t = !0), e.map(function(n) { + return Zt(n, t); }); } -function checkLineStyle(valueNode, allowsKeywords) { - if (allowsKeywords === void 0) { - allowsKeywords = true; - } - if (matches(valueNode, ["none", "hidden"])) { - return false; - } - if (allowsKeywords && matches(valueNode, ["initial", "unset"])) { - return false; - } - return true; +function In(e, t) { + return t === void 0 && (t = !0), !(Hr(e, ["none", "hidden"]) || t && Hr(e, ["initial", "unset"])); } -function checkLineStyleList(nodes, allowsKeywords) { - if (allowsKeywords === void 0) { - allowsKeywords = true; - } - return nodes.map(function(node) { - return checkLineStyle(node, allowsKeywords); +function cd(e, t) { + return t === void 0 && (t = !0), e.map(function(n) { + return In(n, t); }); } -function checkBorderShorthand(node) { - var children = node.getChildren(); - if (children.length === 1) { - var value = children[0]; - return checkLineWidth(value) && checkLineStyle(value); +function hd(e) { + var t = e.getChildren(); + if (t.length === 1) { + var n = t[0]; + return Zt(n) && In(n); } - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var child = children_1[_i]; - var value = child; - if (!checkLineWidth(value, false) || !checkLineStyle(value, false)) { - return false; - } + for (var r = 0, i = t; r < i.length; r++) { + var a = i[r], n = a; + if (!Zt(n, !1) || !In(n, !1)) + return !1; } - return true; + return !0; } -function calculateBoxModel(propertyTable) { - var model = { - top: { value: false, properties: [] }, - right: { value: false, properties: [] }, - bottom: { value: false, properties: [] }, - left: { value: false, properties: [] } - }; - for (var _i = 0, propertyTable_1 = propertyTable; _i < propertyTable_1.length; _i++) { - var property = propertyTable_1[_i]; - var value = property.node.value; - if (typeof value === "undefined") { - continue; - } - switch (property.fullPropertyName) { - case "box-sizing": - return { - top: { value: false, properties: [] }, - right: { value: false, properties: [] }, - bottom: { value: false, properties: [] }, - left: { value: false, properties: [] } - }; - case "width": - model.width = property; - break; - case "height": - model.height = property; - break; - default: - var segments = property.fullPropertyName.split("-"); - switch (segments[0]) { - case "border": - switch (segments[1]) { - case void 0: - case "top": - case "right": - case "bottom": - case "left": - switch (segments[2]) { - case void 0: - updateModelWithValue(model, segments[1], checkBorderShorthand(value), property); - break; - case "width": - updateModelWithValue(model, segments[1], checkLineWidth(value, false), property); - break; - case "style": - updateModelWithValue(model, segments[1], checkLineStyle(value, true), property); - break; - } - break; - case "width": - updateModelWithList(model, checkLineWidthList(value.getChildren(), false), property); - break; - case "style": - updateModelWithList(model, checkLineStyleList(value.getChildren(), true), property); - break; - } - break; - case "padding": - if (segments.length === 1) { - updateModelWithList(model, checkLineWidthList(value.getChildren(), true), property); - } else { - updateModelWithValue(model, segments[1], checkLineWidth(value, true), property); - } - break; - } - break; - } +function dd(e) { + for (var t = { + top: { value: !1, properties: [] }, + right: { value: !1, properties: [] }, + bottom: { value: !1, properties: [] }, + left: { value: !1, properties: [] } + }, n = 0, r = e; n < r.length; n++) { + var i = r[n], a = i.node.value; + if (!(typeof a > "u")) + switch (i.fullPropertyName) { + case "box-sizing": + return { + top: { value: !1, properties: [] }, + right: { value: !1, properties: [] }, + bottom: { value: !1, properties: [] }, + left: { value: !1, properties: [] } + }; + case "width": + t.width = i; + break; + case "height": + t.height = i; + break; + default: + var o = i.fullPropertyName.split("-"); + switch (o[0]) { + case "border": + switch (o[1]) { + case void 0: + case "top": + case "right": + case "bottom": + case "left": + switch (o[2]) { + case void 0: + ue(t, o[1], hd(a), i); + break; + case "width": + ue(t, o[1], Zt(a, !1), i); + break; + case "style": + ue(t, o[1], In(a, !0), i); + break; + } + break; + case "width": + er(t, Ts(a.getChildren(), !1), i); + break; + case "style": + er(t, cd(a.getChildren(), !0), i); + break; + } + break; + case "padding": + o.length === 1 ? er(t, Ts(a.getChildren(), !0), i) : ue(t, o[1], Zt(a, !0), i); + break; + } + break; + } } - return model; + return t; } -var localize9 = loadMessageBundle(); -var NodesByRootMap = function() { - function NodesByRootMap2() { +var qe = Le(), Ws = function() { + function e() { this.data = {}; } - NodesByRootMap2.prototype.add = function(root, name, node) { - var entry = this.data[root]; - if (!entry) { - entry = { nodes: [], names: [] }; - this.data[root] = entry; - } - entry.names.push(name); - if (node) { - entry.nodes.push(node); - } - }; - return NodesByRootMap2; -}(); -var LintVisitor = function() { - function LintVisitor2(document, settings, cssDataManager) { - var _this = this; - this.cssDataManager = cssDataManager; - this.warnings = []; - this.settings = settings; - this.documentText = document.getText(); - this.keyframes = new NodesByRootMap(); - this.validProperties = {}; - var properties = settings.getSetting(Settings.ValidProperties); - if (Array.isArray(properties)) { - properties.forEach(function(p) { - if (typeof p === "string") { - var name = p.trim().toLowerCase(); - if (name.length) { - _this.validProperties[name] = true; - } - } - }); - } + return e.prototype.add = function(t, n, r) { + var i = this.data[t]; + i || (i = { nodes: [], names: [] }, this.data[t] = i), i.names.push(n), r && i.nodes.push(r); + }, e; +}(), ud = function() { + function e(t, n, r) { + var i = this; + this.cssDataManager = r, this.warnings = [], this.settings = n, this.documentText = t.getText(), this.keyframes = new Ws(), this.validProperties = {}; + var a = n.getSetting(rd.ValidProperties); + Array.isArray(a) && a.forEach(function(o) { + if (typeof o == "string") { + var l = o.trim().toLowerCase(); + l.length && (i.validProperties[l] = !0); + } + }); } - LintVisitor2.entries = function(node, document, settings, cssDataManager, entryFilter) { - var visitor = new LintVisitor2(document, settings, cssDataManager); - node.acceptVisitor(visitor); - visitor.completeValidations(); - return visitor.getEntries(entryFilter); - }; - LintVisitor2.prototype.isValidPropertyDeclaration = function(element) { - var propertyName = element.fullPropertyName; - return this.validProperties[propertyName]; - }; - LintVisitor2.prototype.fetch = function(input, s) { - var elements = []; - for (var _i = 0, input_1 = input; _i < input_1.length; _i++) { - var curr = input_1[_i]; - if (curr.fullPropertyName === s) { - elements.push(curr); + return e.entries = function(t, n, r, i, a) { + var o = new e(n, r, i); + return t.acceptVisitor(o), o.completeValidations(), o.getEntries(a); + }, e.prototype.isValidPropertyDeclaration = function(t) { + var n = t.fullPropertyName; + return this.validProperties[n]; + }, e.prototype.fetch = function(t, n) { + for (var r = [], i = 0, a = t; i < a.length; i++) { + var o = a[i]; + o.fullPropertyName === n && r.push(o); + } + return r; + }, e.prototype.fetchWithValue = function(t, n, r) { + for (var i = [], a = 0, o = t; a < o.length; a++) { + var l = o[a]; + if (l.fullPropertyName === n) { + var h = l.node.getValue(); + h && this.findValueInExpression(h, r) && i.push(l); } } - return elements; - }; - LintVisitor2.prototype.fetchWithValue = function(input, s, v) { - var elements = []; - for (var _i = 0, input_2 = input; _i < input_2.length; _i++) { - var inputElement = input_2[_i]; - if (inputElement.fullPropertyName === s) { - var expression = inputElement.node.getValue(); - if (expression && this.findValueInExpression(expression, v)) { - elements.push(inputElement); - } - } - } - return elements; - }; - LintVisitor2.prototype.findValueInExpression = function(expression, v) { - var found = false; - expression.accept(function(node) { - if (node.type === NodeType.Identifier && node.matches(v)) { - found = true; - } - return !found; + return i; + }, e.prototype.findValueInExpression = function(t, n) { + var r = !1; + return t.accept(function(i) { + return i.type === m.Identifier && i.matches(n) && (r = !0), !r; + }), r; + }, e.prototype.getEntries = function(t) { + return t === void 0 && (t = _e.Warning | _e.Error), this.warnings.filter(function(n) { + return (n.getLevel() & t) !== 0; }); - return found; - }; - LintVisitor2.prototype.getEntries = function(filter) { - if (filter === void 0) { - filter = Level.Warning | Level.Error; + }, e.prototype.addEntry = function(t, n, r) { + var i = new bo(t, n, this.settings.getRule(n), r); + this.warnings.push(i); + }, e.prototype.getMissingNames = function(t, n) { + for (var r = t.slice(0), i = 0; i < n.length; i++) { + var a = r.indexOf(n[i]); + a !== -1 && (r[a] = null); } - return this.warnings.filter(function(entry) { - return (entry.getLevel() & filter) !== 0; - }); - }; - LintVisitor2.prototype.addEntry = function(node, rule, details) { - var entry = new Marker(node, rule, this.settings.getRule(rule), details); - this.warnings.push(entry); - }; - LintVisitor2.prototype.getMissingNames = function(expected, actual) { - var expectedClone = expected.slice(0); - for (var i = 0; i < actual.length; i++) { - var k = expectedClone.indexOf(actual[i]); - if (k !== -1) { - expectedClone[k] = null; - } + for (var o = null, i = 0; i < r.length; i++) { + var l = r[i]; + l && (o === null ? o = qe("namelist.single", "'{0}'", l) : o = qe("namelist.concatenated", "{0}, '{1}'", o, l)); } - var result = null; - for (var i = 0; i < expectedClone.length; i++) { - var curr = expectedClone[i]; - if (curr) { - if (result === null) { - result = localize9("namelist.single", "'{0}'", curr); - } else { - result = localize9("namelist.concatenated", "{0}, '{1}'", result, curr); - } - } + return o; + }, e.prototype.visitNode = function(t) { + switch (t.type) { + case m.UnknownAtRule: + return this.visitUnknownAtRule(t); + case m.Keyframe: + return this.visitKeyframe(t); + case m.FontFace: + return this.visitFontFace(t); + case m.Ruleset: + return this.visitRuleSet(t); + case m.SimpleSelector: + return this.visitSimpleSelector(t); + case m.Function: + return this.visitFunction(t); + case m.NumericValue: + return this.visitNumericValue(t); + case m.Import: + return this.visitImport(t); + case m.HexColorValue: + return this.visitHexColorValue(t); + case m.Prio: + return this.visitPrio(t); + case m.IdentifierSelector: + return this.visitIdentifierSelector(t); } - return result; - }; - LintVisitor2.prototype.visitNode = function(node) { - switch (node.type) { - case NodeType.UnknownAtRule: - return this.visitUnknownAtRule(node); - case NodeType.Keyframe: - return this.visitKeyframe(node); - case NodeType.FontFace: - return this.visitFontFace(node); - case NodeType.Ruleset: - return this.visitRuleSet(node); - case NodeType.SimpleSelector: - return this.visitSimpleSelector(node); - case NodeType.Function: - return this.visitFunction(node); - case NodeType.NumericValue: - return this.visitNumericValue(node); - case NodeType.Import: - return this.visitImport(node); - case NodeType.HexColorValue: - return this.visitHexColorValue(node); - case NodeType.Prio: - return this.visitPrio(node); - case NodeType.IdentifierSelector: - return this.visitIdentifierSelector(node); - } - return true; - }; - LintVisitor2.prototype.completeValidations = function() { + return !0; + }, e.prototype.completeValidations = function() { this.validateKeyframes(); - }; - LintVisitor2.prototype.visitUnknownAtRule = function(node) { - var atRuleName = node.getChild(0); - if (!atRuleName) { - return false; - } - var atDirective = this.cssDataManager.getAtDirective(atRuleName.getText()); - if (atDirective) { - return false; - } - this.addEntry(atRuleName, Rules.UnknownAtRules, "Unknown at rule ".concat(atRuleName.getText())); - return true; - }; - LintVisitor2.prototype.visitKeyframe = function(node) { - var keyword = node.getKeyword(); - if (!keyword) { - return false; - } - var text = keyword.getText(); - this.keyframes.add(node.getName(), text, text !== "@keyframes" ? keyword : null); - return true; - }; - LintVisitor2.prototype.validateKeyframes = function() { - var expected = ["@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes"]; - for (var name in this.keyframes.data) { - var actual = this.keyframes.data[name].names; - var needsStandard = actual.indexOf("@keyframes") === -1; - if (!needsStandard && actual.length === 1) { - continue; - } - var missingVendorSpecific = this.getMissingNames(expected, actual); - if (missingVendorSpecific || needsStandard) { - for (var _i = 0, _a2 = this.keyframes.data[name].nodes; _i < _a2.length; _i++) { - var node = _a2[_i]; - if (needsStandard) { - var message = localize9("keyframes.standardrule.missing", "Always define standard rule '@keyframes' when defining keyframes."); - this.addEntry(node, Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message); - } - if (missingVendorSpecific) { - var message = localize9("keyframes.vendorspecific.missing", "Always include all vendor specific rules: Missing: {0}", missingVendorSpecific); - this.addEntry(node, Rules.AllVendorPrefixes, message); - } - } - } - } - return true; - }; - LintVisitor2.prototype.visitSimpleSelector = function(node) { - var firstChar = this.documentText.charAt(node.offset); - if (node.length === 1 && firstChar === "*") { - this.addEntry(node, Rules.UniversalSelector); - } - return true; - }; - LintVisitor2.prototype.visitIdentifierSelector = function(node) { - this.addEntry(node, Rules.AvoidIdSelector); - return true; - }; - LintVisitor2.prototype.visitImport = function(node) { - this.addEntry(node, Rules.ImportStatemement); - return true; - }; - LintVisitor2.prototype.visitRuleSet = function(node) { - var declarations = node.getDeclarations(); - if (!declarations) { - return false; - } - if (!declarations.hasChildren()) { - this.addEntry(node.getSelectors(), Rules.EmptyRuleSet); - } - var propertyTable = []; - for (var _i = 0, _a2 = declarations.getChildren(); _i < _a2.length; _i++) { - var element = _a2[_i]; - if (element instanceof Declaration) { - propertyTable.push(new Element2(element)); - } - } - var boxModel = calculateBoxModel(propertyTable); - if (boxModel.width) { - var properties = []; - if (boxModel.right.value) { - properties = union(properties, boxModel.right.properties); - } - if (boxModel.left.value) { - properties = union(properties, boxModel.left.properties); - } - if (properties.length !== 0) { - for (var _b = 0, properties_1 = properties; _b < properties_1.length; _b++) { - var item = properties_1[_b]; - this.addEntry(item.node, Rules.BewareOfBoxModelSize); - } - this.addEntry(boxModel.width.node, Rules.BewareOfBoxModelSize); - } - } - if (boxModel.height) { - var properties = []; - if (boxModel.top.value) { - properties = union(properties, boxModel.top.properties); - } - if (boxModel.bottom.value) { - properties = union(properties, boxModel.bottom.properties); - } - if (properties.length !== 0) { - for (var _c = 0, properties_2 = properties; _c < properties_2.length; _c++) { - var item = properties_2[_c]; - this.addEntry(item.node, Rules.BewareOfBoxModelSize); - } - this.addEntry(boxModel.height.node, Rules.BewareOfBoxModelSize); - } - } - var displayElems = this.fetchWithValue(propertyTable, "display", "inline-block"); - if (displayElems.length > 0) { - var elem = this.fetch(propertyTable, "float"); - for (var index = 0; index < elem.length; index++) { - var node_1 = elem[index].node; - var value = node_1.getValue(); - if (value && !value.matches("none")) { - this.addEntry(node_1, Rules.PropertyIgnoredDueToDisplay, localize9("rule.propertyIgnoredDueToDisplayInlineBlock", "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'")); - } - } - } - displayElems = this.fetchWithValue(propertyTable, "display", "block"); - if (displayElems.length > 0) { - var elem = this.fetch(propertyTable, "vertical-align"); - for (var index = 0; index < elem.length; index++) { - this.addEntry(elem[index].node, Rules.PropertyIgnoredDueToDisplay, localize9("rule.propertyIgnoredDueToDisplayBlock", "Property is ignored due to the display. With 'display: block', vertical-align should not be used.")); - } - } - var elements = this.fetch(propertyTable, "float"); - for (var index = 0; index < elements.length; index++) { - var element = elements[index]; - if (!this.isValidPropertyDeclaration(element)) { - this.addEntry(element.node, Rules.AvoidFloat); - } - } - for (var i = 0; i < propertyTable.length; i++) { - var element = propertyTable[i]; - if (element.fullPropertyName !== "background" && !this.validProperties[element.fullPropertyName]) { - var value = element.node.getValue(); - if (value && this.documentText.charAt(value.offset) !== "-") { - var elements_1 = this.fetch(propertyTable, element.fullPropertyName); - if (elements_1.length > 1) { - for (var k = 0; k < elements_1.length; k++) { - var value_1 = elements_1[k].node.getValue(); - if (value_1 && this.documentText.charAt(value_1.offset) !== "-" && elements_1[k] !== element) { - this.addEntry(element.node, Rules.DuplicateDeclarations); - } + }, e.prototype.visitUnknownAtRule = function(t) { + var n = t.getChild(0); + if (!n) + return !1; + var r = this.cssDataManager.getAtDirective(n.getText()); + return r ? !1 : (this.addEntry(n, K.UnknownAtRules, "Unknown at rule ".concat(n.getText())), !0); + }, e.prototype.visitKeyframe = function(t) { + var n = t.getKeyword(); + if (!n) + return !1; + var r = n.getText(); + return this.keyframes.add(t.getName(), r, r !== "@keyframes" ? n : null), !0; + }, e.prototype.validateKeyframes = function() { + var t = ["@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes"]; + for (var n in this.keyframes.data) { + var r = this.keyframes.data[n].names, i = r.indexOf("@keyframes") === -1; + if (!(!i && r.length === 1)) { + var a = this.getMissingNames(t, r); + if (a || i) + for (var o = 0, l = this.keyframes.data[n].nodes; o < l.length; o++) { + var h = l[o]; + if (i) { + var c = qe("keyframes.standardrule.missing", "Always define standard rule '@keyframes' when defining keyframes."); + this.addEntry(h, K.IncludeStandardPropertyWhenUsingVendorPrefix, c); + } + if (a) { + var c = qe("keyframes.vendorspecific.missing", "Always include all vendor specific rules: Missing: {0}", a); + this.addEntry(h, K.AllVendorPrefixes, c); } } + } + } + return !0; + }, e.prototype.visitSimpleSelector = function(t) { + var n = this.documentText.charAt(t.offset); + return t.length === 1 && n === "*" && this.addEntry(t, K.UniversalSelector), !0; + }, e.prototype.visitIdentifierSelector = function(t) { + return this.addEntry(t, K.AvoidIdSelector), !0; + }, e.prototype.visitImport = function(t) { + return this.addEntry(t, K.ImportStatemement), !0; + }, e.prototype.visitRuleSet = function(t) { + var n = t.getDeclarations(); + if (!n) + return !1; + n.hasChildren() || this.addEntry(t.getSelectors(), K.EmptyRuleSet); + for (var r = [], i = 0, a = n.getChildren(); i < a.length; i++) { + var o = a[i]; + o instanceof Ve && r.push(new od(o)); + } + var l = dd(r); + if (l.width) { + var h = []; + if (l.right.value && (h = pn(h, l.right.properties)), l.left.value && (h = pn(h, l.left.properties)), h.length !== 0) { + for (var c = 0, d = h; c < d.length; c++) { + var p = d[c]; + this.addEntry(p.node, K.BewareOfBoxModelSize); + } + this.addEntry(l.width.node, K.BewareOfBoxModelSize); + } + } + if (l.height) { + var h = []; + if (l.top.value && (h = pn(h, l.top.properties)), l.bottom.value && (h = pn(h, l.bottom.properties)), h.length !== 0) { + for (var f = 0, g = h; f < g.length; f++) { + var p = g[f]; + this.addEntry(p.node, K.BewareOfBoxModelSize); + } + this.addEntry(l.height.node, K.BewareOfBoxModelSize); + } + } + var w = this.fetchWithValue(r, "display", "inline-block"); + if (w.length > 0) + for (var b = this.fetch(r, "float"), y = 0; y < b.length; y++) { + var A = b[y].node, C = A.getValue(); + C && !C.matches("none") && this.addEntry(A, K.PropertyIgnoredDueToDisplay, qe("rule.propertyIgnoredDueToDisplayInlineBlock", "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'")); + } + if (w = this.fetchWithValue(r, "display", "block"), w.length > 0) + for (var b = this.fetch(r, "vertical-align"), y = 0; y < b.length; y++) + this.addEntry(b[y].node, K.PropertyIgnoredDueToDisplay, qe("rule.propertyIgnoredDueToDisplayBlock", "Property is ignored due to the display. With 'display: block', vertical-align should not be used.")); + for (var R = this.fetch(r, "float"), y = 0; y < R.length; y++) { + var o = R[y]; + this.isValidPropertyDeclaration(o) || this.addEntry(o.node, K.AvoidFloat); + } + for (var k = 0; k < r.length; k++) { + var o = r[k]; + if (o.fullPropertyName !== "background" && !this.validProperties[o.fullPropertyName]) { + var C = o.node.getValue(); + if (C && this.documentText.charAt(C.offset) !== "-") { + var F = this.fetch(r, o.fullPropertyName); + if (F.length > 1) + for (var P = 0; P < F.length; P++) { + var N = F[P].node.getValue(); + N && this.documentText.charAt(N.offset) !== "-" && F[P] !== o && this.addEntry(o.node, K.DuplicateDeclarations); + } } } } - var isExportBlock = node.getSelectors().matches(":export"); - if (!isExportBlock) { - var propertiesBySuffix = new NodesByRootMap(); - var containsUnknowns = false; - for (var _d = 0, propertyTable_1 = propertyTable; _d < propertyTable_1.length; _d++) { - var element = propertyTable_1[_d]; - var decl = element.node; - if (this.isCSSDeclaration(decl)) { - var name = element.fullPropertyName; - var firstChar = name.charAt(0); - if (firstChar === "-") { - if (name.charAt(1) !== "-") { - if (!this.cssDataManager.isKnownProperty(name) && !this.validProperties[name]) { - this.addEntry(decl.getProperty(), Rules.UnknownVendorSpecificProperty); - } - var nonPrefixedName = decl.getNonPrefixedPropertyName(); - propertiesBySuffix.add(nonPrefixedName, name, decl.getProperty()); + var z = t.getSelectors().matches(":export"); + if (!z) { + for (var T = new Ws(), j = !1, U = 0, O = r; U < O.length; U++) { + var o = O[U], re = o.node; + if (this.isCSSDeclaration(re)) { + var de = o.fullPropertyName, Me = de.charAt(0); + if (Me === "-") { + if (de.charAt(1) !== "-") { + !this.cssDataManager.isKnownProperty(de) && !this.validProperties[de] && this.addEntry(re.getProperty(), K.UnknownVendorSpecificProperty); + var Ne = re.getNonPrefixedPropertyName(); + T.add(Ne, de, re.getProperty()); } } else { - var fullName = name; - if (firstChar === "*" || firstChar === "_") { - this.addEntry(decl.getProperty(), Rules.IEStarHack); - name = name.substr(1); + var D = de; + (Me === "*" || Me === "_") && (this.addEntry(re.getProperty(), K.IEStarHack), de = de.substr(1)), !this.cssDataManager.isKnownProperty(D) && !this.cssDataManager.isKnownProperty(de) && (this.validProperties[de] || this.addEntry(re.getProperty(), K.UnknownProperty, qe("property.unknownproperty.detailed", "Unknown property: '{0}'", re.getFullPropertyName()))), T.add(de, de, null); + } + } else + j = !0; + } + if (!j) + for (var S in T.data) { + var E = T.data[S], M = E.names, $ = this.cssDataManager.isStandardProperty(S) && M.indexOf(S) === -1; + if (!(!$ && M.length === 1)) { + for (var H = [], k = 0, Y = e.prefixes.length; k < Y; k++) { + var Te = e.prefixes[k]; + this.cssDataManager.isStandardProperty(Te + S) && H.push(Te + S); } - if (!this.cssDataManager.isKnownProperty(fullName) && !this.cssDataManager.isKnownProperty(name)) { - if (!this.validProperties[name]) { - this.addEntry(decl.getProperty(), Rules.UnknownProperty, localize9("property.unknownproperty.detailed", "Unknown property: '{0}'", decl.getFullPropertyName())); + var ge = this.getMissingNames(H, M); + if (ge || $) + for (var Se = 0, rt = E.nodes; Se < rt.length; Se++) { + var Be = rt[Se]; + if ($) { + var Un = qe("property.standard.missing", "Also define the standard property '{0}' for compatibility", S); + this.addEntry(Be, K.IncludeStandardPropertyWhenUsingVendorPrefix, Un); + } + if (ge) { + var Un = qe("property.vendorspecific.missing", "Always include all vendor specific properties: Missing: {0}", ge); + this.addEntry(Be, K.AllVendorPrefixes, Un); + } } - } - propertiesBySuffix.add(name, name, null); - } - } else { - containsUnknowns = true; - } - } - if (!containsUnknowns) { - for (var suffix in propertiesBySuffix.data) { - var entry = propertiesBySuffix.data[suffix]; - var actual = entry.names; - var needsStandard = this.cssDataManager.isStandardProperty(suffix) && actual.indexOf(suffix) === -1; - if (!needsStandard && actual.length === 1) { - continue; - } - var expected = []; - for (var i = 0, len = LintVisitor2.prefixes.length; i < len; i++) { - var prefix = LintVisitor2.prefixes[i]; - if (this.cssDataManager.isStandardProperty(prefix + suffix)) { - expected.push(prefix + suffix); - } - } - var missingVendorSpecific = this.getMissingNames(expected, actual); - if (missingVendorSpecific || needsStandard) { - for (var _e = 0, _f2 = entry.nodes; _e < _f2.length; _e++) { - var node_2 = _f2[_e]; - if (needsStandard) { - var message = localize9("property.standard.missing", "Also define the standard property '{0}' for compatibility", suffix); - this.addEntry(node_2, Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message); - } - if (missingVendorSpecific) { - var message = localize9("property.vendorspecific.missing", "Always include all vendor specific properties: Missing: {0}", missingVendorSpecific); - this.addEntry(node_2, Rules.AllVendorPrefixes, message); - } - } } } + } + return !0; + }, e.prototype.visitPrio = function(t) { + return this.addEntry(t, K.AvoidImportant), !0; + }, e.prototype.visitNumericValue = function(t) { + var n = t.findParent(m.Function); + if (n && n.getName() === "calc") + return !0; + var r = t.findParent(m.Declaration); + if (r) { + var i = r.getValue(); + if (i) { + var a = t.getValue(); + if (!a.unit || xo.length.indexOf(a.unit.toLowerCase()) === -1) + return !0; + parseFloat(a.value) === 0 && !!a.unit && !this.validProperties[r.getFullPropertyName()] && this.addEntry(t, K.ZeroWithUnit); } } - return true; - }; - LintVisitor2.prototype.visitPrio = function(node) { - this.addEntry(node, Rules.AvoidImportant); - return true; - }; - LintVisitor2.prototype.visitNumericValue = function(node) { - var funcDecl = node.findParent(NodeType.Function); - if (funcDecl && funcDecl.getName() === "calc") { - return true; + return !0; + }, e.prototype.visitFontFace = function(t) { + var n = t.getDeclarations(); + if (!n) + return !1; + for (var r = !1, i = !1, a = !1, o = 0, l = n.getChildren(); o < l.length; o++) { + var h = l[o]; + if (this.isCSSDeclaration(h)) { + var c = h.getProperty().getName().toLowerCase(); + c === "src" && (r = !0), c === "font-family" && (i = !0); + } else + a = !0; } - var decl = node.findParent(NodeType.Declaration); - if (decl) { - var declValue = decl.getValue(); - if (declValue) { - var value = node.getValue(); - if (!value.unit || units.length.indexOf(value.unit.toLowerCase()) === -1) { - return true; - } - if (parseFloat(value.value) === 0 && !!value.unit && !this.validProperties[decl.getFullPropertyName()]) { - this.addEntry(node, Rules.ZeroWithUnit); - } - } + return !a && (!r || !i) && this.addEntry(t, K.RequiredPropertiesForFontFace), !0; + }, e.prototype.isCSSDeclaration = function(t) { + if (t instanceof Ve) { + if (!t.getValue()) + return !1; + var n = t.getProperty(); + if (!n) + return !1; + var r = n.getIdentifier(); + return !(!r || r.containsInterpolation()); } - return true; - }; - LintVisitor2.prototype.visitFontFace = function(node) { - var declarations = node.getDeclarations(); - if (!declarations) { - return false; - } - var definesSrc = false, definesFontFamily = false; - var containsUnknowns = false; - for (var _i = 0, _a2 = declarations.getChildren(); _i < _a2.length; _i++) { - var node_3 = _a2[_i]; - if (this.isCSSDeclaration(node_3)) { - var name = node_3.getProperty().getName().toLowerCase(); - if (name === "src") { - definesSrc = true; - } - if (name === "font-family") { - definesFontFamily = true; - } - } else { - containsUnknowns = true; - } - } - if (!containsUnknowns && (!definesSrc || !definesFontFamily)) { - this.addEntry(node, Rules.RequiredPropertiesForFontFace); - } - return true; - }; - LintVisitor2.prototype.isCSSDeclaration = function(node) { - if (node instanceof Declaration) { - if (!node.getValue()) { - return false; - } - var property = node.getProperty(); - if (!property) { - return false; - } - var identifier = property.getIdentifier(); - if (!identifier || identifier.containsInterpolation()) { - return false; - } - return true; - } - return false; - }; - LintVisitor2.prototype.visitHexColorValue = function(node) { - var length = node.length; - if (length !== 9 && length !== 7 && length !== 5 && length !== 4) { - this.addEntry(node, Rules.HexColorLength); - } - return false; - }; - LintVisitor2.prototype.visitFunction = function(node) { - var fnName = node.getName().toLowerCase(); - var expectedAttrCount = -1; - var actualAttrCount = 0; - switch (fnName) { + return !1; + }, e.prototype.visitHexColorValue = function(t) { + var n = t.length; + return n !== 9 && n !== 7 && n !== 5 && n !== 4 && this.addEntry(t, K.HexColorLength), !1; + }, e.prototype.visitFunction = function(t) { + var n = t.getName().toLowerCase(), r = -1, i = 0; + switch (n) { case "rgb(": case "hsl(": - expectedAttrCount = 3; + r = 3; break; case "rgba(": case "hsla(": - expectedAttrCount = 4; + r = 4; break; } - if (expectedAttrCount !== -1) { - node.getArguments().accept(function(n) { - if (n instanceof BinaryExpression) { - actualAttrCount += 1; - return false; - } - return true; - }); - if (actualAttrCount !== expectedAttrCount) { - this.addEntry(node, Rules.ArgsInColorFunction); - } - } - return true; - }; - LintVisitor2.prefixes = [ + return r !== -1 && (t.getArguments().accept(function(a) { + return a instanceof ai ? (i += 1, !1) : !0; + }), i !== r && this.addEntry(t, K.ArgsInColorFunction)), !0; + }, e.prefixes = [ "-ms-", "-moz-", "-o-", "-webkit-" - ]; - return LintVisitor2; -}(); -var CSSValidation = function() { - function CSSValidation2(cssDataManager) { - this.cssDataManager = cssDataManager; + ], e; +}(), gi = function() { + function e(t) { + this.cssDataManager = t; } - CSSValidation2.prototype.configure = function(settings) { - this.settings = settings; - }; - CSSValidation2.prototype.doValidation = function(document, stylesheet, settings) { - if (settings === void 0) { - settings = this.settings; - } - if (settings && settings.validate === false) { + return e.prototype.configure = function(t) { + this.settings = t; + }, e.prototype.doValidation = function(t, n, r) { + if (r === void 0 && (r = this.settings), r && r.validate === !1) return []; - } - var entries = []; - entries.push.apply(entries, ParseErrorCollector.entries(stylesheet)); - entries.push.apply(entries, LintVisitor.entries(stylesheet, document, new LintConfigurationSettings(settings && settings.lint), this.cssDataManager)); - var ruleIds = []; - for (var r in Rules) { - ruleIds.push(Rules[r].id); - } - function toDiagnostic(marker) { - var range = Range.create(document.positionAt(marker.getOffset()), document.positionAt(marker.getOffset() + marker.getLength())); - var source = document.languageId; + var i = []; + i.push.apply(i, dh.entries(n)), i.push.apply(i, ud.entries(n, t, new id(r && r.lint), this.cssDataManager)); + var a = []; + for (var o in K) + a.push(K[o].id); + function l(h) { + var c = Q.create(t.positionAt(h.getOffset()), t.positionAt(h.getOffset() + h.getLength())), d = t.languageId; return { - code: marker.getRule().id, - source, - message: marker.getMessage(), - severity: marker.getLevel() === Level.Warning ? DiagnosticSeverity.Warning : DiagnosticSeverity.Error, - range + code: h.getRule().id, + source: d, + message: h.getMessage(), + severity: h.getLevel() === _e.Warning ? Dn.Warning : Dn.Error, + range: c }; } - return entries.filter(function(entry) { - return entry.getLevel() !== Level.Ignore; - }).map(toDiagnostic); + return i.filter(function(h) { + return h.getLevel() !== _e.Ignore; + }).map(l); + }, e; +}(), pd = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); }; - return CSSValidation2; -}(); -var __extends4 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(); -var _FSL2 = "/".charCodeAt(0); -var _NWL2 = "\n".charCodeAt(0); -var _CAR2 = "\r".charCodeAt(0); -var _LFD2 = "\f".charCodeAt(0); -var _DLR2 = "$".charCodeAt(0); -var _HSH2 = "#".charCodeAt(0); -var _CUL2 = "{".charCodeAt(0); -var _EQS2 = "=".charCodeAt(0); -var _BNG2 = "!".charCodeAt(0); -var _LAN2 = "<".charCodeAt(0); -var _RAN2 = ">".charCodeAt(0); -var _DOT2 = ".".charCodeAt(0); -var customTokenValue = TokenType.CustomToken; -var VariableName = customTokenValue++; -var InterpolationFunction = customTokenValue++; -customTokenValue++; -var EqualsOperator = customTokenValue++; -var NotEqualsOperator = customTokenValue++; -var GreaterEqualsOperator = customTokenValue++; -var SmallerEqualsOperator = customTokenValue++; -var Ellipsis = customTokenValue++; -customTokenValue++; -var SCSSScanner = function(_super) { - __extends4(SCSSScanner2, _super); - function SCSSScanner2() { - return _super !== null && _super.apply(this, arguments) || this; +}(), Os = "/".charCodeAt(0), fd = ` +`.charCodeAt(0), md = "\r".charCodeAt(0), gd = "\f".charCodeAt(0), bd = "$".charCodeAt(0), vd = "#".charCodeAt(0), yd = "{".charCodeAt(0), Wt = "=".charCodeAt(0), wd = "!".charCodeAt(0), xd = "<".charCodeAt(0), Sd = ">".charCodeAt(0), tr = ".".charCodeAt(0), Ge = u.CustomToken, Gr = Ge++, Ln = Ge++; +Ge++; +var Do = Ge++, Eo = Ge++, Ro = Ge++, Ao = Ge++, yn = Ge++; +Ge++; +var zo = function(e) { + pd(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - SCSSScanner2.prototype.scanNext = function(offset) { - if (this.stream.advanceIfChar(_DLR2)) { - var content = ["$"]; - if (this.ident(content)) { - return this.finishToken(offset, VariableName, content.join("")); - } else { - this.stream.goBackTo(offset); + return t.prototype.scanNext = function(n) { + if (this.stream.advanceIfChar(bd)) { + var r = ["$"]; + if (this.ident(r)) + return this.finishToken(n, Gr, r.join("")); + this.stream.goBackTo(n); + } + return this.stream.advanceIfChars([vd, yd]) ? this.finishToken(n, Ln) : this.stream.advanceIfChars([Wt, Wt]) ? this.finishToken(n, Do) : this.stream.advanceIfChars([wd, Wt]) ? this.finishToken(n, Eo) : this.stream.advanceIfChar(xd) ? this.stream.advanceIfChar(Wt) ? this.finishToken(n, Ao) : this.finishToken(n, u.Delim) : this.stream.advanceIfChar(Sd) ? this.stream.advanceIfChar(Wt) ? this.finishToken(n, Ro) : this.finishToken(n, u.Delim) : this.stream.advanceIfChars([tr, tr, tr]) ? this.finishToken(n, yn) : e.prototype.scanNext.call(this, n); + }, t.prototype.comment = function() { + return e.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Os, Os]) ? (this.stream.advanceWhileChar(function(n) { + switch (n) { + case fd: + case md: + case gd: + return !1; + default: + return !0; } - } - if (this.stream.advanceIfChars([_HSH2, _CUL2])) { - return this.finishToken(offset, InterpolationFunction); - } - if (this.stream.advanceIfChars([_EQS2, _EQS2])) { - return this.finishToken(offset, EqualsOperator); - } - if (this.stream.advanceIfChars([_BNG2, _EQS2])) { - return this.finishToken(offset, NotEqualsOperator); - } - if (this.stream.advanceIfChar(_LAN2)) { - if (this.stream.advanceIfChar(_EQS2)) { - return this.finishToken(offset, SmallerEqualsOperator); - } - return this.finishToken(offset, TokenType.Delim); - } - if (this.stream.advanceIfChar(_RAN2)) { - if (this.stream.advanceIfChar(_EQS2)) { - return this.finishToken(offset, GreaterEqualsOperator); - } - return this.finishToken(offset, TokenType.Delim); - } - if (this.stream.advanceIfChars([_DOT2, _DOT2, _DOT2])) { - return this.finishToken(offset, Ellipsis); - } - return _super.prototype.scanNext.call(this, offset); - }; - SCSSScanner2.prototype.comment = function() { - if (_super.prototype.comment.call(this)) { - return true; - } - if (!this.inURL && this.stream.advanceIfChars([_FSL2, _FSL2])) { - this.stream.advanceWhileChar(function(ch) { - switch (ch) { - case _NWL2: - case _CAR2: - case _LFD2: - return false; - default: - return true; - } - }); - return true; - } else { - return false; - } - }; - return SCSSScanner2; -}(Scanner); -var localize10 = loadMessageBundle(); -var SCSSIssueType = function() { - function SCSSIssueType2(id, message) { - this.id = id; - this.message = message; + }), !0) : !1; + }, t; +}(en), nr = Le(), rr = function() { + function e(t, n) { + this.id = t, this.message = n; } - return SCSSIssueType2; -}(); -var SCSSParseError = { - FromExpected: new SCSSIssueType("scss-fromexpected", localize10("expected.from", "'from' expected")), - ThroughOrToExpected: new SCSSIssueType("scss-throughexpected", localize10("expected.through", "'through' or 'to' expected")), - InExpected: new SCSSIssueType("scss-fromexpected", localize10("expected.in", "'in' expected")) -}; -var __extends5 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); + return e; +}(), ir = { + FromExpected: new rr("scss-fromexpected", nr("expected.from", "'from' expected")), + ThroughOrToExpected: new rr("scss-throughexpected", nr("expected.through", "'through' or 'to' expected")), + InExpected: new rr("scss-fromexpected", nr("expected.in", "'in' expected")) +}, Cd = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(); -var SCSSParser = function(_super) { - __extends5(SCSSParser2, _super); - function SCSSParser2() { - return _super.call(this, new SCSSScanner()) || this; +}(), kd = function(e) { + Cd(t, e); + function t() { + return e.call(this, new zo()) || this; } - SCSSParser2.prototype._parseStylesheetStatement = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - if (this.peek(TokenType.AtKeyword)) { - return this._parseWarnAndDebug() || this._parseControlStatement() || this._parseMixinDeclaration() || this._parseMixinContent() || this._parseMixinReference() || this._parseFunctionDeclaration() || this._parseForward() || this._parseUse() || this._parseRuleset(isNested) || _super.prototype._parseStylesheetAtStatement.call(this, isNested); - } - return this._parseRuleset(true) || this._parseVariableDeclaration(); - }; - SCSSParser2.prototype._parseImport = function() { - if (!this.peekKeyword("@import")) { + return t.prototype._parseStylesheetStatement = function(n) { + return n === void 0 && (n = !1), this.peek(u.AtKeyword) ? this._parseWarnAndDebug() || this._parseControlStatement() || this._parseMixinDeclaration() || this._parseMixinContent() || this._parseMixinReference() || this._parseFunctionDeclaration() || this._parseForward() || this._parseUse() || this._parseRuleset(n) || e.prototype._parseStylesheetAtStatement.call(this, n) : this._parseRuleset(!0) || this._parseVariableDeclaration(); + }, t.prototype._parseImport = function() { + if (!this.peekKeyword("@import")) return null; - } - var node = this.create(Import); - this.consumeToken(); - if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.URIOrStringExpected); - } - while (this.accept(TokenType.Comma)) { - if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.URIOrStringExpected); - } - } - if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) { - node.setMedialist(this._parseMediaQueryList()); - } - return this.finish(node); - }; - SCSSParser2.prototype._parseVariableDeclaration = function(panic) { - if (panic === void 0) { - panic = []; - } - if (!this.peek(VariableName)) { + var n = this.create(ii); + if (this.consumeToken(), !n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral())) + return this.finish(n, v.URIOrStringExpected); + for (; this.accept(u.Comma); ) + if (!n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral())) + return this.finish(n, v.URIOrStringExpected); + return !this.peek(u.SemiColon) && !this.peek(u.EOF) && n.setMedialist(this._parseMediaQueryList()), this.finish(n); + }, t.prototype._parseVariableDeclaration = function(n) { + if (n === void 0 && (n = []), !this.peek(Gr)) return null; - } - var node = this.create(VariableDeclaration); - if (!node.setVariable(this._parseVariable())) { + var r = this.create(Vn); + if (!r.setVariable(this._parseVariable())) return null; - } - if (!this.accept(TokenType.Colon)) { - return this.finish(node, ParseError.ColonExpected); - } - if (this.prevToken) { - node.colonPosition = this.prevToken.offset; - } - if (!node.setValue(this._parseExpr())) { - return this.finish(node, ParseError.VariableValueExpected, [], panic); - } - while (this.peek(TokenType.Exclamation)) { - if (node.addChild(this._tryParsePrio())) - ; - else { - this.consumeToken(); - if (!this.peekRegExp(TokenType.Ident, /^(default|global)$/)) { - return this.finish(node, ParseError.UnknownKeyword); - } + if (!this.accept(u.Colon)) + return this.finish(r, v.ColonExpected); + if (this.prevToken && (r.colonPosition = this.prevToken.offset), !r.setValue(this._parseExpr())) + return this.finish(r, v.VariableValueExpected, [], n); + for (; this.peek(u.Exclamation); ) + if (!r.addChild(this._tryParsePrio())) { + if (this.consumeToken(), !this.peekRegExp(u.Ident, /^(default|global)$/)) + return this.finish(r, v.UnknownKeyword); this.consumeToken(); } - } - if (this.peek(TokenType.SemiColon)) { - node.semicolonPosition = this.token.offset; - } - return this.finish(node); - }; - SCSSParser2.prototype._parseMediaCondition = function() { - return this._parseInterpolation() || _super.prototype._parseMediaCondition.call(this); - }; - SCSSParser2.prototype._parseMediaFeatureName = function() { + return this.peek(u.SemiColon) && (r.semicolonPosition = this.token.offset), this.finish(r); + }, t.prototype._parseMediaCondition = function() { + return this._parseInterpolation() || e.prototype._parseMediaCondition.call(this); + }, t.prototype._parseMediaFeatureName = function() { return this._parseModuleMember() || this._parseFunction() || this._parseIdent() || this._parseVariable(); - }; - SCSSParser2.prototype._parseKeyframeSelector = function() { + }, t.prototype._parseKeyframeSelector = function() { return this._tryParseKeyframeSelector() || this._parseControlStatement(this._parseKeyframeSelector.bind(this)) || this._parseVariableDeclaration() || this._parseMixinContent(); - }; - SCSSParser2.prototype._parseVariable = function() { - if (!this.peek(VariableName)) { + }, t.prototype._parseVariable = function() { + if (!this.peek(Gr)) return null; - } - var node = this.create(Variable); - this.consumeToken(); - return node; - }; - SCSSParser2.prototype._parseModuleMember = function() { - var pos = this.mark(); - var node = this.create(Module); - if (!node.setIdentifier(this._parseIdent([ReferenceType.Module]))) { + var n = this.create(li); + return this.consumeToken(), n; + }, t.prototype._parseModuleMember = function() { + var n = this.mark(), r = this.create(La); + return r.setIdentifier(this._parseIdent([G.Module])) ? this.hasWhitespace() || !this.acceptDelim(".") || this.hasWhitespace() ? (this.restoreAtMark(n), null) : r.addChild(this._parseVariable() || this._parseFunction()) ? r : this.finish(r, v.IdentifierOrVariableExpected) : null; + }, t.prototype._parseIdent = function(n) { + var r = this; + if (!this.peek(u.Ident) && !this.peek(Ln) && !this.peekDelim("-")) return null; - } - if (this.hasWhitespace() || !this.acceptDelim(".") || this.hasWhitespace()) { - this.restoreAtMark(pos); - return null; - } - if (!node.addChild(this._parseVariable() || this._parseFunction())) { - return this.finish(node, ParseError.IdentifierOrVariableExpected); - } - return node; - }; - SCSSParser2.prototype._parseIdent = function(referenceTypes) { - var _this = this; - if (!this.peek(TokenType.Ident) && !this.peek(InterpolationFunction) && !this.peekDelim("-")) { - return null; - } - var node = this.create(Identifier); - node.referenceTypes = referenceTypes; - node.isCustomProperty = this.peekRegExp(TokenType.Ident, /^--/); - var hasContent = false; - var indentInterpolation = function() { - var pos = _this.mark(); - if (_this.acceptDelim("-")) { - if (!_this.hasWhitespace()) { - _this.acceptDelim("-"); - } - if (_this.hasWhitespace()) { - _this.restoreAtMark(pos); - return null; - } - } - return _this._parseInterpolation(); - }; - while (this.accept(TokenType.Ident) || node.addChild(indentInterpolation()) || hasContent && this.acceptRegexp(/^[\w-]/)) { - hasContent = true; - if (this.hasWhitespace()) { - break; - } - } - return hasContent ? this.finish(node) : null; - }; - SCSSParser2.prototype._parseTermExpression = function() { - return this._parseModuleMember() || this._parseVariable() || this._parseSelectorCombinator() || _super.prototype._parseTermExpression.call(this); - }; - SCSSParser2.prototype._parseInterpolation = function() { - if (this.peek(InterpolationFunction)) { - var node = this.create(Interpolation); - this.consumeToken(); - if (!node.addChild(this._parseExpr()) && !this._parseSelectorCombinator()) { - if (this.accept(TokenType.CurlyR)) { - return this.finish(node); - } - return this.finish(node, ParseError.ExpressionExpected); - } - if (!this.accept(TokenType.CurlyR)) { - return this.finish(node, ParseError.RightCurlyExpected); - } - return this.finish(node); - } - return null; - }; - SCSSParser2.prototype._parseOperator = function() { - if (this.peek(EqualsOperator) || this.peek(NotEqualsOperator) || this.peek(GreaterEqualsOperator) || this.peek(SmallerEqualsOperator) || this.peekDelim(">") || this.peekDelim("<") || this.peekIdent("and") || this.peekIdent("or") || this.peekDelim("%")) { - var node = this.createNode(NodeType.Operator); - this.consumeToken(); - return this.finish(node); - } - return _super.prototype._parseOperator.call(this); - }; - SCSSParser2.prototype._parseUnaryOperator = function() { - if (this.peekIdent("not")) { - var node = this.create(Node); - this.consumeToken(); - return this.finish(node); - } - return _super.prototype._parseUnaryOperator.call(this); - }; - SCSSParser2.prototype._parseRuleSetDeclaration = function() { - if (this.peek(TokenType.AtKeyword)) { - return this._parseKeyframe() || this._parseImport() || this._parseMedia(true) || this._parseFontFace() || this._parseWarnAndDebug() || this._parseControlStatement() || this._parseFunctionDeclaration() || this._parseExtends() || this._parseMixinReference() || this._parseMixinContent() || this._parseMixinDeclaration() || this._parseRuleset(true) || this._parseSupports(true) || _super.prototype._parseRuleSetDeclarationAtStatement.call(this); - } - return this._parseVariableDeclaration() || this._tryParseRuleset(true) || _super.prototype._parseRuleSetDeclaration.call(this); - }; - SCSSParser2.prototype._parseDeclaration = function(stopTokens) { - var custonProperty = this._tryParseCustomPropertyDeclaration(stopTokens); - if (custonProperty) { - return custonProperty; - } - var node = this.create(Declaration); - if (!node.setProperty(this._parseProperty())) { - return null; - } - if (!this.accept(TokenType.Colon)) { - return this.finish(node, ParseError.ColonExpected, [TokenType.Colon], stopTokens || [TokenType.SemiColon]); - } - if (this.prevToken) { - node.colonPosition = this.prevToken.offset; - } - var hasContent = false; - if (node.setValue(this._parseExpr())) { - hasContent = true; - node.addChild(this._parsePrio()); - } - if (this.peek(TokenType.CurlyL)) { - node.setNestedProperties(this._parseNestedProperties()); - } else { - if (!hasContent) { - return this.finish(node, ParseError.PropertyValueExpected); - } - } - if (this.peek(TokenType.SemiColon)) { - node.semicolonPosition = this.token.offset; - } - return this.finish(node); - }; - SCSSParser2.prototype._parseNestedProperties = function() { - var node = this.create(NestedProperties); - return this._parseBody(node, this._parseDeclaration.bind(this)); - }; - SCSSParser2.prototype._parseExtends = function() { - if (this.peekKeyword("@extend")) { - var node = this.create(ExtendsReference); - this.consumeToken(); - if (!node.getSelectors().addChild(this._parseSimpleSelector())) { - return this.finish(node, ParseError.SelectorExpected); - } - while (this.accept(TokenType.Comma)) { - node.getSelectors().addChild(this._parseSimpleSelector()); - } - if (this.accept(TokenType.Exclamation)) { - if (!this.acceptIdent("optional")) { - return this.finish(node, ParseError.UnknownKeyword); - } - } - return this.finish(node); - } - return null; - }; - SCSSParser2.prototype._parseSimpleSelectorBody = function() { - return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || _super.prototype._parseSimpleSelectorBody.call(this); - }; - SCSSParser2.prototype._parseSelectorCombinator = function() { - if (this.peekDelim("&")) { - var node = this.createNode(NodeType.SelectorCombinator); - this.consumeToken(); - while (!this.hasWhitespace() && (this.acceptDelim("-") || this.accept(TokenType.Num) || this.accept(TokenType.Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim("&"))) { - } - return this.finish(node); - } - return null; - }; - SCSSParser2.prototype._parseSelectorPlaceholder = function() { - if (this.peekDelim("%")) { - var node = this.createNode(NodeType.SelectorPlaceholder); - this.consumeToken(); - this._parseIdent(); - return this.finish(node); - } else if (this.peekKeyword("@at-root")) { - var node = this.createNode(NodeType.SelectorPlaceholder); - this.consumeToken(); - return this.finish(node); - } - return null; - }; - SCSSParser2.prototype._parseElementName = function() { - var pos = this.mark(); - var node = _super.prototype._parseElementName.call(this); - if (node && !this.hasWhitespace() && this.peek(TokenType.ParenthesisL)) { - this.restoreAtMark(pos); - return null; - } - return node; - }; - SCSSParser2.prototype._tryParsePseudoIdentifier = function() { - return this._parseInterpolation() || _super.prototype._tryParsePseudoIdentifier.call(this); - }; - SCSSParser2.prototype._parseWarnAndDebug = function() { - if (!this.peekKeyword("@debug") && !this.peekKeyword("@warn") && !this.peekKeyword("@error")) { - return null; - } - var node = this.createNode(NodeType.Debug); - this.consumeToken(); - node.addChild(this._parseExpr()); - return this.finish(node); - }; - SCSSParser2.prototype._parseControlStatement = function(parseStatement) { - if (parseStatement === void 0) { - parseStatement = this._parseRuleSetDeclaration.bind(this); - } - if (!this.peek(TokenType.AtKeyword)) { - return null; - } - return this._parseIfStatement(parseStatement) || this._parseForStatement(parseStatement) || this._parseEachStatement(parseStatement) || this._parseWhileStatement(parseStatement); - }; - SCSSParser2.prototype._parseIfStatement = function(parseStatement) { - if (!this.peekKeyword("@if")) { - return null; - } - return this._internalParseIfStatement(parseStatement); - }; - SCSSParser2.prototype._internalParseIfStatement = function(parseStatement) { - var node = this.create(IfStatement); - this.consumeToken(); - if (!node.setExpression(this._parseExpr(true))) { - return this.finish(node, ParseError.ExpressionExpected); - } - this._parseBody(node, parseStatement); - if (this.acceptKeyword("@else")) { - if (this.peekIdent("if")) { - node.setElseClause(this._internalParseIfStatement(parseStatement)); - } else if (this.peek(TokenType.CurlyL)) { - var elseNode = this.create(ElseStatement); - this._parseBody(elseNode, parseStatement); - node.setElseClause(elseNode); - } - } - return this.finish(node); - }; - SCSSParser2.prototype._parseForStatement = function(parseStatement) { - if (!this.peekKeyword("@for")) { - return null; - } - var node = this.create(ForStatement); - this.consumeToken(); - if (!node.setVariable(this._parseVariable())) { - return this.finish(node, ParseError.VariableNameExpected, [TokenType.CurlyR]); - } - if (!this.acceptIdent("from")) { - return this.finish(node, SCSSParseError.FromExpected, [TokenType.CurlyR]); - } - if (!node.addChild(this._parseBinaryExpr())) { - return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]); - } - if (!this.acceptIdent("to") && !this.acceptIdent("through")) { - return this.finish(node, SCSSParseError.ThroughOrToExpected, [TokenType.CurlyR]); - } - if (!node.addChild(this._parseBinaryExpr())) { - return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]); - } - return this._parseBody(node, parseStatement); - }; - SCSSParser2.prototype._parseEachStatement = function(parseStatement) { - if (!this.peekKeyword("@each")) { - return null; - } - var node = this.create(EachStatement); - this.consumeToken(); - var variables = node.getVariables(); - if (!variables.addChild(this._parseVariable())) { - return this.finish(node, ParseError.VariableNameExpected, [TokenType.CurlyR]); - } - while (this.accept(TokenType.Comma)) { - if (!variables.addChild(this._parseVariable())) { - return this.finish(node, ParseError.VariableNameExpected, [TokenType.CurlyR]); - } - } - this.finish(variables); - if (!this.acceptIdent("in")) { - return this.finish(node, SCSSParseError.InExpected, [TokenType.CurlyR]); - } - if (!node.addChild(this._parseExpr())) { - return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]); - } - return this._parseBody(node, parseStatement); - }; - SCSSParser2.prototype._parseWhileStatement = function(parseStatement) { - if (!this.peekKeyword("@while")) { - return null; - } - var node = this.create(WhileStatement); - this.consumeToken(); - if (!node.addChild(this._parseBinaryExpr())) { - return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]); - } - return this._parseBody(node, parseStatement); - }; - SCSSParser2.prototype._parseFunctionBodyDeclaration = function() { - return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug() || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this)); - }; - SCSSParser2.prototype._parseFunctionDeclaration = function() { - if (!this.peekKeyword("@function")) { - return null; - } - var node = this.create(FunctionDeclaration); - this.consumeToken(); - if (!node.setIdentifier(this._parseIdent([ReferenceType.Function]))) { - return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]); - } - if (!this.accept(TokenType.ParenthesisL)) { - return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.CurlyR]); - } - if (node.getParameters().addChild(this._parseParameterDeclaration())) { - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getParameters().addChild(this._parseParameterDeclaration())) { - return this.finish(node, ParseError.VariableNameExpected); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.CurlyR]); - } - return this._parseBody(node, this._parseFunctionBodyDeclaration.bind(this)); - }; - SCSSParser2.prototype._parseReturnStatement = function() { - if (!this.peekKeyword("@return")) { - return null; - } - var node = this.createNode(NodeType.ReturnStatement); - this.consumeToken(); - if (!node.addChild(this._parseExpr())) { - return this.finish(node, ParseError.ExpressionExpected); - } - return this.finish(node); - }; - SCSSParser2.prototype._parseMixinDeclaration = function() { - if (!this.peekKeyword("@mixin")) { - return null; - } - var node = this.create(MixinDeclaration); - this.consumeToken(); - if (!node.setIdentifier(this._parseIdent([ReferenceType.Mixin]))) { - return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]); - } - if (this.accept(TokenType.ParenthesisL)) { - if (node.getParameters().addChild(this._parseParameterDeclaration())) { - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getParameters().addChild(this._parseParameterDeclaration())) { - return this.finish(node, ParseError.VariableNameExpected); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.CurlyR]); - } - } - return this._parseBody(node, this._parseRuleSetDeclaration.bind(this)); - }; - SCSSParser2.prototype._parseParameterDeclaration = function() { - var node = this.create(FunctionParameter); - if (!node.setIdentifier(this._parseVariable())) { - return null; - } - if (this.accept(Ellipsis)) + var i = this.create(Re); + i.referenceTypes = n, i.isCustomProperty = this.peekRegExp(u.Ident, /^--/); + for (var a = !1, o = function() { + var l = r.mark(); + return r.acceptDelim("-") && (r.hasWhitespace() || r.acceptDelim("-"), r.hasWhitespace()) ? (r.restoreAtMark(l), null) : r._parseInterpolation(); + }; (this.accept(u.Ident) || i.addChild(o()) || a && this.acceptRegexp(/^[\w-]/)) && (a = !0, !this.hasWhitespace()); ) ; - if (this.accept(TokenType.Colon)) { - if (!node.setDefaultValue(this._parseExpr(true))) { - return this.finish(node, ParseError.VariableValueExpected, [], [TokenType.Comma, TokenType.ParenthesisR]); - } - } - return this.finish(node); - }; - SCSSParser2.prototype._parseMixinContent = function() { - if (!this.peekKeyword("@content")) { - return null; - } - var node = this.create(MixinContentReference); - this.consumeToken(); - if (this.accept(TokenType.ParenthesisL)) { - if (node.getArguments().addChild(this._parseFunctionArgument())) { - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getArguments().addChild(this._parseFunctionArgument())) { - return this.finish(node, ParseError.ExpressionExpected); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - } - return this.finish(node); - }; - SCSSParser2.prototype._parseMixinReference = function() { - if (!this.peekKeyword("@include")) { - return null; - } - var node = this.create(MixinReference); - this.consumeToken(); - var firstIdent = this._parseIdent([ReferenceType.Mixin]); - if (!node.setIdentifier(firstIdent)) { - return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]); - } - if (!this.hasWhitespace() && this.acceptDelim(".") && !this.hasWhitespace()) { - var secondIdent = this._parseIdent([ReferenceType.Mixin]); - if (!secondIdent) { - return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]); - } - var moduleToken = this.create(Module); - firstIdent.referenceTypes = [ReferenceType.Module]; - moduleToken.setIdentifier(firstIdent); - node.setIdentifier(secondIdent); - node.addChild(moduleToken); - } - if (this.accept(TokenType.ParenthesisL)) { - if (node.getArguments().addChild(this._parseFunctionArgument())) { - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getArguments().addChild(this._parseFunctionArgument())) { - return this.finish(node, ParseError.ExpressionExpected); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - } - if (this.peekIdent("using") || this.peek(TokenType.CurlyL)) { - node.setContent(this._parseMixinContentDeclaration()); - } - return this.finish(node); - }; - SCSSParser2.prototype._parseMixinContentDeclaration = function() { - var node = this.create(MixinContentDeclaration); - if (this.acceptIdent("using")) { - if (!this.accept(TokenType.ParenthesisL)) { - return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.CurlyL]); - } - if (node.getParameters().addChild(this._parseParameterDeclaration())) { - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getParameters().addChild(this._parseParameterDeclaration())) { - return this.finish(node, ParseError.VariableNameExpected); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.CurlyL]); - } - } - if (this.peek(TokenType.CurlyL)) { - this._parseBody(node, this._parseMixinReferenceBodyStatement.bind(this)); - } - return this.finish(node); - }; - SCSSParser2.prototype._parseMixinReferenceBodyStatement = function() { - return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration(); - }; - SCSSParser2.prototype._parseFunctionArgument = function() { - var node = this.create(FunctionArgument); - var pos = this.mark(); - var argument = this._parseVariable(); - if (argument) { - if (!this.accept(TokenType.Colon)) { - if (this.accept(Ellipsis)) { - node.setValue(argument); - return this.finish(node); - } else { - this.restoreAtMark(pos); - } - } else { - node.setIdentifier(argument); - } - } - if (node.setValue(this._parseExpr(true))) { - this.accept(Ellipsis); - node.addChild(this._parsePrio()); - return this.finish(node); - } else if (node.setValue(this._tryParsePrio())) { - return this.finish(node); + return a ? this.finish(i) : null; + }, t.prototype._parseTermExpression = function() { + return this._parseModuleMember() || this._parseVariable() || this._parseSelectorCombinator() || e.prototype._parseTermExpression.call(this); + }, t.prototype._parseInterpolation = function() { + if (this.peek(Ln)) { + var n = this.create(zr); + return this.consumeToken(), !n.addChild(this._parseExpr()) && !this._parseSelectorCombinator() ? this.accept(u.CurlyR) ? this.finish(n) : this.finish(n, v.ExpressionExpected) : this.accept(u.CurlyR) ? this.finish(n) : this.finish(n, v.RightCurlyExpected); } return null; - }; - SCSSParser2.prototype._parseURLArgument = function() { - var pos = this.mark(); - var node = _super.prototype._parseURLArgument.call(this); - if (!node || !this.peek(TokenType.ParenthesisR)) { - this.restoreAtMark(pos); - var node_1 = this.create(Node); - node_1.addChild(this._parseBinaryExpr()); - return this.finish(node_1); + }, t.prototype._parseOperator = function() { + if (this.peek(Do) || this.peek(Eo) || this.peek(Ro) || this.peek(Ao) || this.peekDelim(">") || this.peekDelim("<") || this.peekIdent("and") || this.peekIdent("or") || this.peekDelim("%")) { + var n = this.createNode(m.Operator); + return this.consumeToken(), this.finish(n); } - return node; - }; - SCSSParser2.prototype._parseOperation = function() { - if (!this.peek(TokenType.ParenthesisL)) { + return e.prototype._parseOperator.call(this); + }, t.prototype._parseUnaryOperator = function() { + if (this.peekIdent("not")) { + var n = this.create(L); + return this.consumeToken(), this.finish(n); + } + return e.prototype._parseUnaryOperator.call(this); + }, t.prototype._parseRuleSetDeclaration = function() { + return this.peek(u.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) || e.prototype._parseRuleSetDeclarationAtStatement.call(this) : this._parseVariableDeclaration() || this._tryParseRuleset(!0) || e.prototype._parseRuleSetDeclaration.call(this); + }, t.prototype._parseDeclaration = function(n) { + var r = this._tryParseCustomPropertyDeclaration(n); + if (r) + return r; + var i = this.create(Ve); + if (!i.setProperty(this._parseProperty())) return null; + if (!this.accept(u.Colon)) + return this.finish(i, v.ColonExpected, [u.Colon], n || [u.SemiColon]); + this.prevToken && (i.colonPosition = this.prevToken.offset); + var a = !1; + if (i.setValue(this._parseExpr()) && (a = !0, i.addChild(this._parsePrio())), this.peek(u.CurlyL)) + i.setNestedProperties(this._parseNestedProperties()); + else if (!a) + return this.finish(i, v.PropertyValueExpected); + return this.peek(u.SemiColon) && (i.semicolonPosition = this.token.offset), this.finish(i); + }, t.prototype._parseNestedProperties = function() { + var n = this.create(co); + return this._parseBody(n, this._parseDeclaration.bind(this)); + }, t.prototype._parseExtends = function() { + if (this.peekKeyword("@extend")) { + var n = this.create(qt); + if (this.consumeToken(), !n.getSelectors().addChild(this._parseSimpleSelector())) + return this.finish(n, v.SelectorExpected); + for (; this.accept(u.Comma); ) + n.getSelectors().addChild(this._parseSimpleSelector()); + return this.accept(u.Exclamation) && !this.acceptIdent("optional") ? this.finish(n, v.UnknownKeyword) : this.finish(n); } - var node = this.create(Node); + return null; + }, t.prototype._parseSimpleSelectorBody = function() { + return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || e.prototype._parseSimpleSelectorBody.call(this); + }, t.prototype._parseSelectorCombinator = function() { + if (this.peekDelim("&")) { + var n = this.createNode(m.SelectorCombinator); + for (this.consumeToken(); !this.hasWhitespace() && (this.acceptDelim("-") || this.accept(u.Num) || this.accept(u.Dimension) || n.addChild(this._parseIdent()) || this.acceptDelim("&")); ) + ; + return this.finish(n); + } + return null; + }, t.prototype._parseSelectorPlaceholder = function() { + if (this.peekDelim("%")) { + var n = this.createNode(m.SelectorPlaceholder); + return this.consumeToken(), this._parseIdent(), this.finish(n); + } else if (this.peekKeyword("@at-root")) { + var n = this.createNode(m.SelectorPlaceholder); + return this.consumeToken(), this.finish(n); + } + return null; + }, t.prototype._parseElementName = function() { + var n = this.mark(), r = e.prototype._parseElementName.call(this); + return r && !this.hasWhitespace() && this.peek(u.ParenthesisL) ? (this.restoreAtMark(n), null) : r; + }, t.prototype._tryParsePseudoIdentifier = function() { + return this._parseInterpolation() || e.prototype._tryParsePseudoIdentifier.call(this); + }, t.prototype._parseWarnAndDebug = function() { + if (!this.peekKeyword("@debug") && !this.peekKeyword("@warn") && !this.peekKeyword("@error")) + return null; + var n = this.createNode(m.Debug); + return this.consumeToken(), n.addChild(this._parseExpr()), this.finish(n); + }, t.prototype._parseControlStatement = function(n) { + return n === void 0 && (n = this._parseRuleSetDeclaration.bind(this)), this.peek(u.AtKeyword) ? this._parseIfStatement(n) || this._parseForStatement(n) || this._parseEachStatement(n) || this._parseWhileStatement(n) : null; + }, t.prototype._parseIfStatement = function(n) { + return this.peekKeyword("@if") ? this._internalParseIfStatement(n) : null; + }, t.prototype._internalParseIfStatement = function(n) { + var r = this.create(Wc); + if (this.consumeToken(), !r.setExpression(this._parseExpr(!0))) + return this.finish(r, v.ExpressionExpected); + if (this._parseBody(r, n), this.acceptKeyword("@else")) { + if (this.peekIdent("if")) + r.setElseClause(this._internalParseIfStatement(n)); + else if (this.peek(u.CurlyL)) { + var i = this.create(Bc); + this._parseBody(i, n), r.setElseClause(i); + } + } + return this.finish(r); + }, t.prototype._parseForStatement = function(n) { + if (!this.peekKeyword("@for")) + return null; + var r = this.create(Oc); + return this.consumeToken(), r.setVariable(this._parseVariable()) ? this.acceptIdent("from") ? r.addChild(this._parseBinaryExpr()) ? !this.acceptIdent("to") && !this.acceptIdent("through") ? this.finish(r, ir.ThroughOrToExpected, [u.CurlyR]) : r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, v.ExpressionExpected, [u.CurlyR]) : this.finish(r, v.ExpressionExpected, [u.CurlyR]) : this.finish(r, ir.FromExpected, [u.CurlyR]) : this.finish(r, v.VariableNameExpected, [u.CurlyR]); + }, t.prototype._parseEachStatement = function(n) { + if (!this.peekKeyword("@each")) + return null; + var r = this.create(Vc); this.consumeToken(); - while (node.addChild(this._parseListElement())) { - this.accept(TokenType.Comma); - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - return this.finish(node); - }; - SCSSParser2.prototype._parseListElement = function() { - var node = this.create(ListEntry); - var child = this._parseBinaryExpr(); - if (!child) { + var i = r.getVariables(); + if (!i.addChild(this._parseVariable())) + return this.finish(r, v.VariableNameExpected, [u.CurlyR]); + for (; this.accept(u.Comma); ) + if (!i.addChild(this._parseVariable())) + return this.finish(r, v.VariableNameExpected, [u.CurlyR]); + return this.finish(i), this.acceptIdent("in") ? r.addChild(this._parseExpr()) ? this._parseBody(r, n) : this.finish(r, v.ExpressionExpected, [u.CurlyR]) : this.finish(r, ir.InExpected, [u.CurlyR]); + }, t.prototype._parseWhileStatement = function(n) { + if (!this.peekKeyword("@while")) return null; + var r = this.create(Uc); + return this.consumeToken(), r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, v.ExpressionExpected, [u.CurlyR]); + }, t.prototype._parseFunctionBodyDeclaration = function() { + return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug() || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this)); + }, t.prototype._parseFunctionDeclaration = function() { + if (!this.peekKeyword("@function")) + return null; + var n = this.create(kn); + if (this.consumeToken(), !n.setIdentifier(this._parseIdent([G.Function]))) + return this.finish(n, v.IdentifierExpected, [u.CurlyR]); + if (!this.accept(u.ParenthesisL)) + return this.finish(n, v.LeftParenthesisExpected, [u.CurlyR]); + if (n.getParameters().addChild(this._parseParameterDeclaration())) { + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + if (!n.getParameters().addChild(this._parseParameterDeclaration())) + return this.finish(n, v.VariableNameExpected); } - if (this.accept(TokenType.Colon)) { - node.setKey(child); - if (!node.setValue(this._parseBinaryExpr())) { - return this.finish(node, ParseError.ExpressionExpected); + return this.accept(u.ParenthesisR) ? this._parseBody(n, this._parseFunctionBodyDeclaration.bind(this)) : this.finish(n, v.RightParenthesisExpected, [u.CurlyR]); + }, t.prototype._parseReturnStatement = function() { + if (!this.peekKeyword("@return")) + return null; + var n = this.createNode(m.ReturnStatement); + return this.consumeToken(), n.addChild(this._parseExpr()) ? this.finish(n) : this.finish(n, v.ExpressionExpected); + }, t.prototype._parseMixinDeclaration = function() { + if (!this.peekKeyword("@mixin")) + return null; + var n = this.create($t); + if (this.consumeToken(), !n.setIdentifier(this._parseIdent([G.Mixin]))) + return this.finish(n, v.IdentifierExpected, [u.CurlyR]); + if (this.accept(u.ParenthesisL)) { + if (n.getParameters().addChild(this._parseParameterDeclaration())) { + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + if (!n.getParameters().addChild(this._parseParameterDeclaration())) + return this.finish(n, v.VariableNameExpected); } - } else { - node.setValue(child); + if (!this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected, [u.CurlyR]); } - return this.finish(node); - }; - SCSSParser2.prototype._parseUse = function() { - if (!this.peekKeyword("@use")) { + return this._parseBody(n, this._parseRuleSetDeclaration.bind(this)); + }, t.prototype._parseParameterDeclaration = function() { + var n = this.create(On); + return n.setIdentifier(this._parseVariable()) ? (this.accept(yn), this.accept(u.Colon) && !n.setDefaultValue(this._parseExpr(!0)) ? this.finish(n, v.VariableValueExpected, [], [u.Comma, u.ParenthesisR]) : this.finish(n)) : null; + }, t.prototype._parseMixinContent = function() { + if (!this.peekKeyword("@content")) return null; + var n = this.create(sh); + if (this.consumeToken(), this.accept(u.ParenthesisL)) { + if (n.getArguments().addChild(this._parseFunctionArgument())) { + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + if (!n.getArguments().addChild(this._parseFunctionArgument())) + return this.finish(n, v.ExpressionExpected); + } + if (!this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected); } - var node = this.create(Use); + return this.finish(n); + }, t.prototype._parseMixinReference = function() { + if (!this.peekKeyword("@include")) + return null; + var n = this.create(Fn); this.consumeToken(); - if (!node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.StringLiteralExpected); + var r = this._parseIdent([G.Mixin]); + if (!n.setIdentifier(r)) + return this.finish(n, v.IdentifierExpected, [u.CurlyR]); + if (!this.hasWhitespace() && this.acceptDelim(".") && !this.hasWhitespace()) { + var i = this._parseIdent([G.Mixin]); + if (!i) + return this.finish(n, v.IdentifierExpected, [u.CurlyR]); + var a = this.create(La); + r.referenceTypes = [G.Module], a.setIdentifier(r), n.setIdentifier(i), n.addChild(a); } - if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) { - if (!this.peekRegExp(TokenType.Ident, /as|with/)) { - return this.finish(node, ParseError.UnknownKeyword); + if (this.accept(u.ParenthesisL)) { + if (n.getArguments().addChild(this._parseFunctionArgument())) { + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + if (!n.getArguments().addChild(this._parseFunctionArgument())) + return this.finish(n, v.ExpressionExpected); } - if (this.acceptIdent("as") && (!node.setIdentifier(this._parseIdent([ReferenceType.Module])) && !this.acceptDelim("*"))) { - return this.finish(node, ParseError.IdentifierOrWildcardExpected); + if (!this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected); + } + return (this.peekIdent("using") || this.peek(u.CurlyL)) && n.setContent(this._parseMixinContentDeclaration()), this.finish(n); + }, t.prototype._parseMixinContentDeclaration = function() { + var n = this.create(oh); + if (this.acceptIdent("using")) { + if (!this.accept(u.ParenthesisL)) + return this.finish(n, v.LeftParenthesisExpected, [u.CurlyL]); + if (n.getParameters().addChild(this._parseParameterDeclaration())) { + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + if (!n.getParameters().addChild(this._parseParameterDeclaration())) + return this.finish(n, v.VariableNameExpected); } + if (!this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected, [u.CurlyL]); + } + return this.peek(u.CurlyL) && this._parseBody(n, this._parseMixinReferenceBodyStatement.bind(this)), this.finish(n); + }, t.prototype._parseMixinReferenceBodyStatement = function() { + return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration(); + }, t.prototype._parseFunctionArgument = function() { + var n = this.create(Dt), r = this.mark(), i = this._parseVariable(); + if (i) + if (this.accept(u.Colon)) + n.setIdentifier(i); + else { + if (this.accept(yn)) + return n.setValue(i), this.finish(n); + this.restoreAtMark(r); + } + return n.setValue(this._parseExpr(!0)) ? (this.accept(yn), n.addChild(this._parsePrio()), this.finish(n)) : n.setValue(this._tryParsePrio()) ? this.finish(n) : null; + }, t.prototype._parseURLArgument = function() { + var n = this.mark(), r = e.prototype._parseURLArgument.call(this); + if (!r || !this.peek(u.ParenthesisR)) { + this.restoreAtMark(n); + var i = this.create(L); + return i.addChild(this._parseBinaryExpr()), this.finish(i); + } + return r; + }, t.prototype._parseOperation = function() { + if (!this.peek(u.ParenthesisL)) + return null; + var n = this.create(L); + for (this.consumeToken(); n.addChild(this._parseListElement()); ) + this.accept(u.Comma); + return this.accept(u.ParenthesisR) ? this.finish(n) : this.finish(n, v.RightParenthesisExpected); + }, t.prototype._parseListElement = function() { + var n = this.create(lh), r = this._parseBinaryExpr(); + if (!r) + return null; + if (this.accept(u.Colon)) { + if (n.setKey(r), !n.setValue(this._parseBinaryExpr())) + return this.finish(n, v.ExpressionExpected); + } else + n.setValue(r); + return this.finish(n); + }, t.prototype._parseUse = function() { + if (!this.peekKeyword("@use")) + return null; + var n = this.create(qc); + if (this.consumeToken(), !n.addChild(this._parseStringLiteral())) + return this.finish(n, v.StringLiteralExpected); + if (!this.peek(u.SemiColon) && !this.peek(u.EOF)) { + if (!this.peekRegExp(u.Ident, /as|with/)) + return this.finish(n, v.UnknownKeyword); + if (this.acceptIdent("as") && !n.setIdentifier(this._parseIdent([G.Module])) && !this.acceptDelim("*")) + return this.finish(n, v.IdentifierOrWildcardExpected); if (this.acceptIdent("with")) { - if (!this.accept(TokenType.ParenthesisL)) { - return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.ParenthesisR]); - } - if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) { - return this.finish(node, ParseError.VariableNameExpected); - } - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) { - return this.finish(node, ParseError.VariableNameExpected); - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } + if (!this.accept(u.ParenthesisL)) + return this.finish(n, v.LeftParenthesisExpected, [u.ParenthesisR]); + if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) + return this.finish(n, v.VariableNameExpected); + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) + return this.finish(n, v.VariableNameExpected); + if (!this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected); } } - if (!this.accept(TokenType.SemiColon) && !this.accept(TokenType.EOF)) { - return this.finish(node, ParseError.SemiColonExpected); - } - return this.finish(node); - }; - SCSSParser2.prototype._parseModuleConfigDeclaration = function() { - var node = this.create(ModuleConfiguration); - if (!node.setIdentifier(this._parseVariable())) { + return !this.accept(u.SemiColon) && !this.accept(u.EOF) ? this.finish(n, v.SemiColonExpected) : this.finish(n); + }, t.prototype._parseModuleConfigDeclaration = function() { + var n = this.create($c); + return n.setIdentifier(this._parseVariable()) ? !this.accept(u.Colon) || !n.setValue(this._parseExpr(!0)) ? this.finish(n, v.VariableValueExpected, [], [u.Comma, u.ParenthesisR]) : this.accept(u.Exclamation) && (this.hasWhitespace() || !this.acceptIdent("default")) ? this.finish(n, v.UnknownKeyword) : this.finish(n) : null; + }, t.prototype._parseForward = function() { + if (!this.peekKeyword("@forward")) return null; - } - if (!this.accept(TokenType.Colon) || !node.setValue(this._parseExpr(true))) { - return this.finish(node, ParseError.VariableValueExpected, [], [TokenType.Comma, TokenType.ParenthesisR]); - } - if (this.accept(TokenType.Exclamation)) { - if (this.hasWhitespace() || !this.acceptIdent("default")) { - return this.finish(node, ParseError.UnknownKeyword); - } - } - return this.finish(node); - }; - SCSSParser2.prototype._parseForward = function() { - if (!this.peekKeyword("@forward")) { - return null; - } - var node = this.create(Forward); - this.consumeToken(); - if (!node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.StringLiteralExpected); - } + var n = this.create(Hc); + if (this.consumeToken(), !n.addChild(this._parseStringLiteral())) + return this.finish(n, v.StringLiteralExpected); if (this.acceptIdent("with")) { - if (!this.accept(TokenType.ParenthesisL)) { - return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.ParenthesisR]); - } - if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) { - return this.finish(node, ParseError.VariableNameExpected); - } - while (this.accept(TokenType.Comma)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) { - return this.finish(node, ParseError.VariableNameExpected); - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } + if (!this.accept(u.ParenthesisL)) + return this.finish(n, v.LeftParenthesisExpected, [u.ParenthesisR]); + if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) + return this.finish(n, v.VariableNameExpected); + for (; this.accept(u.Comma) && !this.peek(u.ParenthesisR); ) + if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) + return this.finish(n, v.VariableNameExpected); + if (!this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected); } - if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) { - if (!this.peekRegExp(TokenType.Ident, /as|hide|show/)) { - return this.finish(node, ParseError.UnknownKeyword); - } + if (!this.peek(u.SemiColon) && !this.peek(u.EOF)) { + if (!this.peekRegExp(u.Ident, /as|hide|show/)) + return this.finish(n, v.UnknownKeyword); if (this.acceptIdent("as")) { - var identifier = this._parseIdent([ReferenceType.Forward]); - if (!node.setIdentifier(identifier)) { - return this.finish(node, ParseError.IdentifierExpected); - } - if (this.hasWhitespace() || !this.acceptDelim("*")) { - return this.finish(node, ParseError.WildcardExpected); - } - } - if (this.peekIdent("hide") || this.peekIdent("show")) { - if (!node.addChild(this._parseForwardVisibility())) { - return this.finish(node, ParseError.IdentifierOrVariableExpected); - } + var r = this._parseIdent([G.Forward]); + if (!n.setIdentifier(r)) + return this.finish(n, v.IdentifierExpected); + if (this.hasWhitespace() || !this.acceptDelim("*")) + return this.finish(n, v.WildcardExpected); } + if ((this.peekIdent("hide") || this.peekIdent("show")) && !n.addChild(this._parseForwardVisibility())) + return this.finish(n, v.IdentifierOrVariableExpected); } - if (!this.accept(TokenType.SemiColon) && !this.accept(TokenType.EOF)) { - return this.finish(node, ParseError.SemiColonExpected); + return !this.accept(u.SemiColon) && !this.accept(u.EOF) ? this.finish(n, v.SemiColonExpected) : this.finish(n); + }, t.prototype._parseForwardVisibility = function() { + var n = this.create(Gc); + for (n.setIdentifier(this._parseIdent()); n.addChild(this._parseVariable() || this._parseIdent()); ) + this.accept(u.Comma); + return n.getChildren().length > 1 ? n : null; + }, t.prototype._parseSupportsCondition = function() { + return this._parseInterpolation() || e.prototype._parseSupportsCondition.call(this); + }, t; +}(ci), Fd = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); + }; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; } - return this.finish(node); + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; - SCSSParser2.prototype._parseForwardVisibility = function() { - var node = this.create(ForwardVisibility); - node.setIdentifier(this._parseIdent()); - while (node.addChild(this._parseVariable() || this._parseIdent())) { - this.accept(TokenType.Comma); - } - return node.getChildren().length > 1 ? node : null; - }; - SCSSParser2.prototype._parseSupportsCondition = function() { - return this._parseInterpolation() || _super.prototype._parseSupportsCondition.call(this); - }; - return SCSSParser2; -}(Parser); -var __extends6 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); -var localize11 = loadMessageBundle(); -var SCSSCompletion = function(_super) { - __extends6(SCSSCompletion2, _super); - function SCSSCompletion2(lsServiceOptions, cssDataManager) { - var _this = _super.call(this, "$", lsServiceOptions, cssDataManager) || this; - addReferencesToDocumentation(SCSSCompletion2.scssModuleLoaders); - addReferencesToDocumentation(SCSSCompletion2.scssModuleBuiltIns); - return _this; +}(), _ = Le(), _d = function(e) { + Fd(t, e); + function t(n, r) { + var i = e.call(this, "$", n, r) || this; + return Vs(t.scssModuleLoaders), Vs(t.scssModuleBuiltIns), i; } - SCSSCompletion2.prototype.isImportPathParent = function(type) { - return type === NodeType.Forward || type === NodeType.Use || _super.prototype.isImportPathParent.call(this, type); - }; - SCSSCompletion2.prototype.getCompletionForImportPath = function(importPathNode, result) { - var parentType = importPathNode.getParent().type; - if (parentType === NodeType.Forward || parentType === NodeType.Use) { - for (var _i = 0, _a2 = SCSSCompletion2.scssModuleBuiltIns; _i < _a2.length; _i++) { - var p = _a2[_i]; - var item = { - label: p.label, - documentation: p.documentation, - textEdit: TextEdit.replace(this.getCompletionRange(importPathNode), "'".concat(p.label, "'")), - kind: CompletionItemKind.Module + return t.prototype.isImportPathParent = function(n) { + return n === m.Forward || n === m.Use || e.prototype.isImportPathParent.call(this, n); + }, t.prototype.getCompletionForImportPath = function(n, r) { + var i = n.getParent().type; + if (i === m.Forward || i === m.Use) + for (var a = 0, o = t.scssModuleBuiltIns; a < o.length; a++) { + var l = o[a], h = { + label: l.label, + documentation: l.documentation, + textEdit: B.replace(this.getCompletionRange(n), "'".concat(l.label, "'")), + kind: V.Module }; - result.items.push(item); + r.items.push(h); } - } - return _super.prototype.getCompletionForImportPath.call(this, importPathNode, result); - }; - SCSSCompletion2.prototype.createReplaceFunction = function() { - var tabStopCounter = 1; - return function(_match, p1) { - return "\\" + p1 + ": ${" + tabStopCounter++ + ":" + (SCSSCompletion2.variableDefaults[p1] || "") + "}"; + return e.prototype.getCompletionForImportPath.call(this, n, r); + }, t.prototype.createReplaceFunction = function() { + var n = 1; + return function(r, i) { + return "\\" + i + ": ${" + n++ + ":" + (t.variableDefaults[i] || "") + "}"; }; - }; - SCSSCompletion2.prototype.createFunctionProposals = function(proposals, existingNode, sortToEnd, result) { - for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) { - var p = proposals_1[_i]; - var insertText = p.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction()); - var label = p.func.substr(0, p.func.indexOf("(")); - var item = { - label, - detail: p.func, - documentation: p.desc, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText), - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Function + }, t.prototype.createFunctionProposals = function(n, r, i, a) { + for (var o = 0, l = n; o < l.length; o++) { + var h = l[o], c = h.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction()), d = h.func.substr(0, h.func.indexOf("(")), p = { + label: d, + detail: h.func, + documentation: h.desc, + textEdit: B.replace(this.getCompletionRange(r), c), + insertTextFormat: ke.Snippet, + kind: V.Function }; - if (sortToEnd) { - item.sortText = "z"; - } - result.items.push(item); + i && (p.sortText = "z"), a.items.push(p); } - return result; - }; - SCSSCompletion2.prototype.getCompletionsForSelector = function(ruleSet, isNested, result) { - this.createFunctionProposals(SCSSCompletion2.selectorFuncs, null, true, result); - return _super.prototype.getCompletionsForSelector.call(this, ruleSet, isNested, result); - }; - SCSSCompletion2.prototype.getTermProposals = function(entry, existingNode, result) { - var functions = SCSSCompletion2.builtInFuncs; - if (entry) { - functions = functions.filter(function(f2) { - return !f2.type || !entry.restrictions || entry.restrictions.indexOf(f2.type) !== -1; - }); - } - this.createFunctionProposals(functions, existingNode, true, result); - return _super.prototype.getTermProposals.call(this, entry, existingNode, result); - }; - SCSSCompletion2.prototype.getColorProposals = function(entry, existingNode, result) { - this.createFunctionProposals(SCSSCompletion2.colorProposals, existingNode, false, result); - return _super.prototype.getColorProposals.call(this, entry, existingNode, result); - }; - SCSSCompletion2.prototype.getCompletionsForDeclarationProperty = function(declaration, result) { - this.getCompletionForAtDirectives(result); - this.getCompletionsForSelector(null, true, result); - return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result); - }; - SCSSCompletion2.prototype.getCompletionsForExtendsReference = function(_extendsRef, existingNode, result) { - var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Rule); - for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) { - var symbol = symbols_1[_i]; - var suggest = { - label: symbol.name, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), symbol.name), - kind: CompletionItemKind.Function + return a; + }, t.prototype.getCompletionsForSelector = function(n, r, i) { + return this.createFunctionProposals(t.selectorFuncs, null, !0, i), e.prototype.getCompletionsForSelector.call(this, n, r, i); + }, t.prototype.getTermProposals = function(n, r, i) { + var a = t.builtInFuncs; + return n && (a = a.filter(function(o) { + return !o.type || !n.restrictions || n.restrictions.indexOf(o.type) !== -1; + })), this.createFunctionProposals(a, r, !0, i), e.prototype.getTermProposals.call(this, n, r, i); + }, t.prototype.getColorProposals = function(n, r, i) { + return this.createFunctionProposals(t.colorProposals, r, !1, i), e.prototype.getColorProposals.call(this, n, r, i); + }, t.prototype.getCompletionsForDeclarationProperty = function(n, r) { + return this.getCompletionForAtDirectives(r), this.getCompletionsForSelector(null, !0, r), e.prototype.getCompletionsForDeclarationProperty.call(this, n, r); + }, t.prototype.getCompletionsForExtendsReference = function(n, r, i) { + for (var a = this.getSymbolContext().findSymbolsAtOffset(this.offset, G.Rule), o = 0, l = a; o < l.length; o++) { + var h = l[o], c = { + label: h.name, + textEdit: B.replace(this.getCompletionRange(r), h.name), + kind: V.Function }; - result.items.push(suggest); + i.items.push(c); } - return result; - }; - SCSSCompletion2.prototype.getCompletionForAtDirectives = function(result) { - var _a2; - (_a2 = result.items).push.apply(_a2, SCSSCompletion2.scssAtDirectives); - return result; - }; - SCSSCompletion2.prototype.getCompletionForTopLevel = function(result) { - this.getCompletionForAtDirectives(result); - this.getCompletionForModuleLoaders(result); - _super.prototype.getCompletionForTopLevel.call(this, result); - return result; - }; - SCSSCompletion2.prototype.getCompletionForModuleLoaders = function(result) { - var _a2; - (_a2 = result.items).push.apply(_a2, SCSSCompletion2.scssModuleLoaders); - return result; - }; - SCSSCompletion2.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" - }; - SCSSCompletion2.colorProposals = [ - { func: "red($color)", desc: localize11("scss.builtin.red", "Gets the red component of a color.") }, - { func: "green($color)", desc: localize11("scss.builtin.green", "Gets the green component of a color.") }, - { func: "blue($color)", desc: localize11("scss.builtin.blue", "Gets the blue component of a color.") }, - { func: "mix($color, $color, [$weight])", desc: localize11("scss.builtin.mix", "Mixes two colors together.") }, - { func: "hue($color)", desc: localize11("scss.builtin.hue", "Gets the hue component of a color.") }, - { func: "saturation($color)", desc: localize11("scss.builtin.saturation", "Gets the saturation component of a color.") }, - { func: "lightness($color)", desc: localize11("scss.builtin.lightness", "Gets the lightness component of a color.") }, - { func: "adjust-hue($color, $degrees)", desc: localize11("scss.builtin.adjust-hue", "Changes the hue of a color.") }, - { func: "lighten($color, $amount)", desc: localize11("scss.builtin.lighten", "Makes a color lighter.") }, - { func: "darken($color, $amount)", desc: localize11("scss.builtin.darken", "Makes a color darker.") }, - { func: "saturate($color, $amount)", desc: localize11("scss.builtin.saturate", "Makes a color more saturated.") }, - { func: "desaturate($color, $amount)", desc: localize11("scss.builtin.desaturate", "Makes a color less saturated.") }, - { func: "grayscale($color)", desc: localize11("scss.builtin.grayscale", "Converts a color to grayscale.") }, - { func: "complement($color)", desc: localize11("scss.builtin.complement", "Returns the complement of a color.") }, - { func: "invert($color)", desc: localize11("scss.builtin.invert", "Returns the inverse of a color.") }, - { func: "alpha($color)", desc: localize11("scss.builtin.alpha", "Gets the opacity component of a color.") }, + return i; + }, t.prototype.getCompletionForAtDirectives = function(n) { + var r; + return (r = n.items).push.apply(r, t.scssAtDirectives), n; + }, t.prototype.getCompletionForTopLevel = function(n) { + return this.getCompletionForAtDirectives(n), this.getCompletionForModuleLoaders(n), e.prototype.getCompletionForTopLevel.call(this, n), n; + }, t.prototype.getCompletionForModuleLoaders = function(n) { + var r; + return (r = n.items).push.apply(r, t.scssModuleLoaders), n; + }, t.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" + }, t.colorProposals = [ + { func: "red($color)", desc: _("scss.builtin.red", "Gets the red component of a color.") }, + { func: "green($color)", desc: _("scss.builtin.green", "Gets the green component of a color.") }, + { func: "blue($color)", desc: _("scss.builtin.blue", "Gets the blue component of a color.") }, + { func: "mix($color, $color, [$weight])", desc: _("scss.builtin.mix", "Mixes two colors together.") }, + { func: "hue($color)", desc: _("scss.builtin.hue", "Gets the hue component of a color.") }, + { func: "saturation($color)", desc: _("scss.builtin.saturation", "Gets the saturation component of a color.") }, + { func: "lightness($color)", desc: _("scss.builtin.lightness", "Gets the lightness component of a color.") }, + { func: "adjust-hue($color, $degrees)", desc: _("scss.builtin.adjust-hue", "Changes the hue of a color.") }, + { func: "lighten($color, $amount)", desc: _("scss.builtin.lighten", "Makes a color lighter.") }, + { func: "darken($color, $amount)", desc: _("scss.builtin.darken", "Makes a color darker.") }, + { func: "saturate($color, $amount)", desc: _("scss.builtin.saturate", "Makes a color more saturated.") }, + { func: "desaturate($color, $amount)", desc: _("scss.builtin.desaturate", "Makes a color less saturated.") }, + { func: "grayscale($color)", desc: _("scss.builtin.grayscale", "Converts a color to grayscale.") }, + { func: "complement($color)", desc: _("scss.builtin.complement", "Returns the complement of a color.") }, + { func: "invert($color)", desc: _("scss.builtin.invert", "Returns the inverse of a color.") }, + { func: "alpha($color)", desc: _("scss.builtin.alpha", "Gets the opacity component of a color.") }, { func: "opacity($color)", desc: "Gets the alpha component (opacity) of a color." }, - { func: "rgba($color, $alpha)", desc: localize11("scss.builtin.rgba", "Changes the alpha component for a color.") }, - { func: "opacify($color, $amount)", desc: localize11("scss.builtin.opacify", "Makes a color more opaque.") }, - { func: "fade-in($color, $amount)", desc: localize11("scss.builtin.fade-in", "Makes a color more opaque.") }, - { func: "transparentize($color, $amount)", desc: localize11("scss.builtin.transparentize", "Makes a color more transparent.") }, - { func: "fade-out($color, $amount)", desc: localize11("scss.builtin.fade-out", "Makes a color more transparent.") }, - { func: "adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])", desc: localize11("scss.builtin.adjust-color", "Increases or decreases one or more components of a color.") }, - { func: "scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])", desc: localize11("scss.builtin.scale-color", "Fluidly scales one or more properties of a color.") }, - { func: "change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])", desc: localize11("scss.builtin.change-color", "Changes one or more properties of a color.") }, - { func: "ie-hex-str($color)", desc: localize11("scss.builtin.ie-hex-str", "Converts a color into the format understood by IE filters.") } - ]; - SCSSCompletion2.selectorFuncs = [ - { func: "selector-nest($selectors\u2026)", desc: localize11("scss.builtin.selector-nest", "Nests selector beneath one another like they would be nested in the stylesheet.") }, - { func: "selector-append($selectors\u2026)", desc: localize11("scss.builtin.selector-append", "Appends selectors to one another without spaces in between.") }, - { func: "selector-extend($selector, $extendee, $extender)", desc: localize11("scss.builtin.selector-extend", "Extends $extendee with $extender within $selector.") }, - { func: "selector-replace($selector, $original, $replacement)", desc: localize11("scss.builtin.selector-replace", "Replaces $original with $replacement within $selector.") }, - { func: "selector-unify($selector1, $selector2)", desc: localize11("scss.builtin.selector-unify", "Unifies two selectors to produce a selector that matches elements matched by both.") }, - { func: "is-superselector($super, $sub)", desc: localize11("scss.builtin.is-superselector", "Returns whether $super matches all the elements $sub does, and possibly more.") }, - { func: "simple-selectors($selector)", desc: localize11("scss.builtin.simple-selectors", "Returns the simple selectors that comprise a compound selector.") }, - { func: "selector-parse($selector)", desc: localize11("scss.builtin.selector-parse", "Parses a selector into the format returned by &.") } - ]; - SCSSCompletion2.builtInFuncs = [ - { func: "unquote($string)", desc: localize11("scss.builtin.unquote", "Removes quotes from a string.") }, - { func: "quote($string)", desc: localize11("scss.builtin.quote", "Adds quotes to a string.") }, - { func: "str-length($string)", desc: localize11("scss.builtin.str-length", "Returns the number of characters in a string.") }, - { func: "str-insert($string, $insert, $index)", desc: localize11("scss.builtin.str-insert", "Inserts $insert into $string at $index.") }, - { func: "str-index($string, $substring)", desc: localize11("scss.builtin.str-index", "Returns the index of the first occurance of $substring in $string.") }, - { func: "str-slice($string, $start-at, [$end-at])", desc: localize11("scss.builtin.str-slice", "Extracts a substring from $string.") }, - { func: "to-upper-case($string)", desc: localize11("scss.builtin.to-upper-case", "Converts a string to upper case.") }, - { func: "to-lower-case($string)", desc: localize11("scss.builtin.to-lower-case", "Converts a string to lower case.") }, - { func: "percentage($number)", desc: localize11("scss.builtin.percentage", "Converts a unitless number to a percentage."), type: "percentage" }, - { func: "round($number)", desc: localize11("scss.builtin.round", "Rounds a number to the nearest whole number.") }, - { func: "ceil($number)", desc: localize11("scss.builtin.ceil", "Rounds a number up to the next whole number.") }, - { func: "floor($number)", desc: localize11("scss.builtin.floor", "Rounds a number down to the previous whole number.") }, - { func: "abs($number)", desc: localize11("scss.builtin.abs", "Returns the absolute value of a number.") }, - { func: "min($numbers)", desc: localize11("scss.builtin.min", "Finds the minimum of several numbers.") }, - { func: "max($numbers)", desc: localize11("scss.builtin.max", "Finds the maximum of several numbers.") }, - { func: "random([$limit])", desc: localize11("scss.builtin.random", "Returns a random number.") }, - { func: "length($list)", desc: localize11("scss.builtin.length", "Returns the length of a list.") }, - { func: "nth($list, $n)", desc: localize11("scss.builtin.nth", "Returns a specific item in a list.") }, - { func: "set-nth($list, $n, $value)", desc: localize11("scss.builtin.set-nth", "Replaces the nth item in a list.") }, - { func: "join($list1, $list2, [$separator])", desc: localize11("scss.builtin.join", "Joins together two lists into one.") }, - { func: "append($list1, $val, [$separator])", desc: localize11("scss.builtin.append", "Appends a single value onto the end of a list.") }, - { func: "zip($lists)", desc: localize11("scss.builtin.zip", "Combines several lists into a single multidimensional list.") }, - { func: "index($list, $value)", desc: localize11("scss.builtin.index", "Returns the position of a value within a list.") }, - { func: "list-separator(#list)", desc: localize11("scss.builtin.list-separator", "Returns the separator of a list.") }, - { func: "map-get($map, $key)", desc: localize11("scss.builtin.map-get", "Returns the value in a map associated with a given key.") }, - { func: "map-merge($map1, $map2)", desc: localize11("scss.builtin.map-merge", "Merges two maps together into a new map.") }, - { func: "map-remove($map, $keys)", desc: localize11("scss.builtin.map-remove", "Returns a new map with keys removed.") }, - { func: "map-keys($map)", desc: localize11("scss.builtin.map-keys", "Returns a list of all keys in a map.") }, - { func: "map-values($map)", desc: localize11("scss.builtin.map-values", "Returns a list of all values in a map.") }, - { func: "map-has-key($map, $key)", desc: localize11("scss.builtin.map-has-key", "Returns whether a map has a value associated with a given key.") }, - { func: "keywords($args)", desc: localize11("scss.builtin.keywords", "Returns the keywords passed to a function that takes variable arguments.") }, - { func: "feature-exists($feature)", desc: localize11("scss.builtin.feature-exists", "Returns whether a feature exists in the current Sass runtime.") }, - { func: "variable-exists($name)", desc: localize11("scss.builtin.variable-exists", "Returns whether a variable with the given name exists in the current scope.") }, - { func: "global-variable-exists($name)", desc: localize11("scss.builtin.global-variable-exists", "Returns whether a variable with the given name exists in the global scope.") }, - { func: "function-exists($name)", desc: localize11("scss.builtin.function-exists", "Returns whether a function with the given name exists.") }, - { func: "mixin-exists($name)", desc: localize11("scss.builtin.mixin-exists", "Returns whether a mixin with the given name exists.") }, - { func: "inspect($value)", desc: localize11("scss.builtin.inspect", "Returns the string representation of a value as it would be represented in Sass.") }, - { func: "type-of($value)", desc: localize11("scss.builtin.type-of", "Returns the type of a value.") }, - { func: "unit($number)", desc: localize11("scss.builtin.unit", "Returns the unit(s) associated with a number.") }, - { func: "unitless($number)", desc: localize11("scss.builtin.unitless", "Returns whether a number has units.") }, - { func: "comparable($number1, $number2)", desc: localize11("scss.builtin.comparable", "Returns whether two numbers can be added, subtracted, or compared.") }, - { func: "call($name, $args\u2026)", desc: localize11("scss.builtin.call", "Dynamically calls a Sass function.") } - ]; - SCSSCompletion2.scssAtDirectives = [ + { func: "rgba($color, $alpha)", desc: _("scss.builtin.rgba", "Changes the alpha component for a color.") }, + { func: "opacify($color, $amount)", desc: _("scss.builtin.opacify", "Makes a color more opaque.") }, + { func: "fade-in($color, $amount)", desc: _("scss.builtin.fade-in", "Makes a color more opaque.") }, + { func: "transparentize($color, $amount)", desc: _("scss.builtin.transparentize", "Makes a color more transparent.") }, + { func: "fade-out($color, $amount)", desc: _("scss.builtin.fade-out", "Makes a color more transparent.") }, + { func: "adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])", desc: _("scss.builtin.adjust-color", "Increases or decreases one or more components of a color.") }, + { func: "scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])", desc: _("scss.builtin.scale-color", "Fluidly scales one or more properties of a color.") }, + { func: "change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])", desc: _("scss.builtin.change-color", "Changes one or more properties of a color.") }, + { func: "ie-hex-str($color)", desc: _("scss.builtin.ie-hex-str", "Converts a color into the format understood by IE filters.") } + ], t.selectorFuncs = [ + { func: "selector-nest($selectors\u2026)", desc: _("scss.builtin.selector-nest", "Nests selector beneath one another like they would be nested in the stylesheet.") }, + { func: "selector-append($selectors\u2026)", desc: _("scss.builtin.selector-append", "Appends selectors to one another without spaces in between.") }, + { func: "selector-extend($selector, $extendee, $extender)", desc: _("scss.builtin.selector-extend", "Extends $extendee with $extender within $selector.") }, + { func: "selector-replace($selector, $original, $replacement)", desc: _("scss.builtin.selector-replace", "Replaces $original with $replacement within $selector.") }, + { func: "selector-unify($selector1, $selector2)", desc: _("scss.builtin.selector-unify", "Unifies two selectors to produce a selector that matches elements matched by both.") }, + { func: "is-superselector($super, $sub)", desc: _("scss.builtin.is-superselector", "Returns whether $super matches all the elements $sub does, and possibly more.") }, + { func: "simple-selectors($selector)", desc: _("scss.builtin.simple-selectors", "Returns the simple selectors that comprise a compound selector.") }, + { func: "selector-parse($selector)", desc: _("scss.builtin.selector-parse", "Parses a selector into the format returned by &.") } + ], t.builtInFuncs = [ + { func: "unquote($string)", desc: _("scss.builtin.unquote", "Removes quotes from a string.") }, + { func: "quote($string)", desc: _("scss.builtin.quote", "Adds quotes to a string.") }, + { func: "str-length($string)", desc: _("scss.builtin.str-length", "Returns the number of characters in a string.") }, + { func: "str-insert($string, $insert, $index)", desc: _("scss.builtin.str-insert", "Inserts $insert into $string at $index.") }, + { func: "str-index($string, $substring)", desc: _("scss.builtin.str-index", "Returns the index of the first occurance of $substring in $string.") }, + { func: "str-slice($string, $start-at, [$end-at])", desc: _("scss.builtin.str-slice", "Extracts a substring from $string.") }, + { func: "to-upper-case($string)", desc: _("scss.builtin.to-upper-case", "Converts a string to upper case.") }, + { func: "to-lower-case($string)", desc: _("scss.builtin.to-lower-case", "Converts a string to lower case.") }, + { func: "percentage($number)", desc: _("scss.builtin.percentage", "Converts a unitless number to a percentage."), type: "percentage" }, + { func: "round($number)", desc: _("scss.builtin.round", "Rounds a number to the nearest whole number.") }, + { func: "ceil($number)", desc: _("scss.builtin.ceil", "Rounds a number up to the next whole number.") }, + { func: "floor($number)", desc: _("scss.builtin.floor", "Rounds a number down to the previous whole number.") }, + { func: "abs($number)", desc: _("scss.builtin.abs", "Returns the absolute value of a number.") }, + { func: "min($numbers)", desc: _("scss.builtin.min", "Finds the minimum of several numbers.") }, + { func: "max($numbers)", desc: _("scss.builtin.max", "Finds the maximum of several numbers.") }, + { func: "random([$limit])", desc: _("scss.builtin.random", "Returns a random number.") }, + { func: "length($list)", desc: _("scss.builtin.length", "Returns the length of a list.") }, + { func: "nth($list, $n)", desc: _("scss.builtin.nth", "Returns a specific item in a list.") }, + { func: "set-nth($list, $n, $value)", desc: _("scss.builtin.set-nth", "Replaces the nth item in a list.") }, + { func: "join($list1, $list2, [$separator])", desc: _("scss.builtin.join", "Joins together two lists into one.") }, + { func: "append($list1, $val, [$separator])", desc: _("scss.builtin.append", "Appends a single value onto the end of a list.") }, + { func: "zip($lists)", desc: _("scss.builtin.zip", "Combines several lists into a single multidimensional list.") }, + { func: "index($list, $value)", desc: _("scss.builtin.index", "Returns the position of a value within a list.") }, + { func: "list-separator(#list)", desc: _("scss.builtin.list-separator", "Returns the separator of a list.") }, + { func: "map-get($map, $key)", desc: _("scss.builtin.map-get", "Returns the value in a map associated with a given key.") }, + { func: "map-merge($map1, $map2)", desc: _("scss.builtin.map-merge", "Merges two maps together into a new map.") }, + { func: "map-remove($map, $keys)", desc: _("scss.builtin.map-remove", "Returns a new map with keys removed.") }, + { func: "map-keys($map)", desc: _("scss.builtin.map-keys", "Returns a list of all keys in a map.") }, + { func: "map-values($map)", desc: _("scss.builtin.map-values", "Returns a list of all values in a map.") }, + { func: "map-has-key($map, $key)", desc: _("scss.builtin.map-has-key", "Returns whether a map has a value associated with a given key.") }, + { func: "keywords($args)", desc: _("scss.builtin.keywords", "Returns the keywords passed to a function that takes variable arguments.") }, + { func: "feature-exists($feature)", desc: _("scss.builtin.feature-exists", "Returns whether a feature exists in the current Sass runtime.") }, + { func: "variable-exists($name)", desc: _("scss.builtin.variable-exists", "Returns whether a variable with the given name exists in the current scope.") }, + { func: "global-variable-exists($name)", desc: _("scss.builtin.global-variable-exists", "Returns whether a variable with the given name exists in the global scope.") }, + { func: "function-exists($name)", desc: _("scss.builtin.function-exists", "Returns whether a function with the given name exists.") }, + { func: "mixin-exists($name)", desc: _("scss.builtin.mixin-exists", "Returns whether a mixin with the given name exists.") }, + { func: "inspect($value)", desc: _("scss.builtin.inspect", "Returns the string representation of a value as it would be represented in Sass.") }, + { func: "type-of($value)", desc: _("scss.builtin.type-of", "Returns the type of a value.") }, + { func: "unit($number)", desc: _("scss.builtin.unit", "Returns the unit(s) associated with a number.") }, + { func: "unitless($number)", desc: _("scss.builtin.unitless", "Returns whether a number has units.") }, + { func: "comparable($number1, $number2)", desc: _("scss.builtin.comparable", "Returns whether two numbers can be added, subtracted, or compared.") }, + { func: "call($name, $args\u2026)", desc: _("scss.builtin.call", "Dynamically calls a Sass function.") } + ], t.scssAtDirectives = [ { label: "@extend", - documentation: localize11("scss.builtin.@extend", "Inherits the styles of another selector."), - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@extend", "Inherits the styles of another selector."), + kind: V.Keyword }, { label: "@at-root", - documentation: localize11("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."), - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."), + kind: V.Keyword }, { label: "@debug", - documentation: localize11("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."), - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."), + kind: V.Keyword }, { label: "@warn", - documentation: localize11("scss.builtin.@warn", "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: CompletionItemKind.Keyword + documentation: _("scss.builtin.@warn", "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: V.Keyword }, { label: "@error", - documentation: localize11("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."), - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."), + kind: V.Keyword }, { label: "@if", - documentation: localize11("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."), - insertText: "@if ${1:expr} {\n $0\n}", - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."), + insertText: `@if \${1:expr} { + $0 +}`, + insertTextFormat: ke.Snippet, + kind: V.Keyword }, { label: "@for", - documentation: localize11("scss.builtin.@for", "For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."), + documentation: _("scss.builtin.@for", "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 $0\n}", - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Keyword + insertTextFormat: ke.Snippet, + kind: V.Keyword }, { label: "@each", - documentation: localize11("scss.builtin.@each", "Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."), + documentation: _("scss.builtin.@each", "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 $0\n}", - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Keyword + insertTextFormat: ke.Snippet, + kind: V.Keyword }, { label: "@while", - documentation: localize11("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."), - insertText: "@while ${1:condition} {\n $0\n}", - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."), + insertText: `@while \${1:condition} { + $0 +}`, + insertTextFormat: ke.Snippet, + kind: V.Keyword }, { label: "@mixin", - documentation: localize11("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`."), - insertText: "@mixin ${1:name} {\n $0\n}", - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`."), + insertText: `@mixin \${1:name} { + $0 +}`, + insertTextFormat: ke.Snippet, + kind: V.Keyword }, { label: "@include", - documentation: localize11("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."), - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."), + kind: V.Keyword }, { label: "@function", - documentation: localize11("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."), - kind: CompletionItemKind.Keyword + documentation: _("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."), + kind: V.Keyword } - ]; - SCSSCompletion2.scssModuleLoaders = [ + ], t.scssModuleLoaders = [ { label: "@use", - documentation: localize11("scss.builtin.@use", "Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."), + documentation: _("scss.builtin.@use", "Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/at-rules/use" }], insertText: "@use $0;", - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Keyword + insertTextFormat: ke.Snippet, + kind: V.Keyword }, { label: "@forward", - documentation: localize11("scss.builtin.@forward", "Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."), + documentation: _("scss.builtin.@forward", "Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/at-rules/forward" }], insertText: "@forward $0;", - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Keyword + insertTextFormat: ke.Snippet, + kind: V.Keyword } - ]; - SCSSCompletion2.scssModuleBuiltIns = [ + ], t.scssModuleBuiltIns = [ { label: "sass:math", - documentation: localize11("scss.builtin.sass:math", "Provides functions that operate on numbers."), + documentation: _("scss.builtin.sass:math", "Provides functions that operate on numbers."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/math" }] }, { label: "sass:string", - documentation: localize11("scss.builtin.sass:string", "Makes it easy to combine, search, or split apart strings."), + documentation: _("scss.builtin.sass:string", "Makes it easy to combine, search, or split apart strings."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/string" }] }, { label: "sass:color", - documentation: localize11("scss.builtin.sass:color", "Generates new colors based on existing ones, making it easy to build color themes."), + documentation: _("scss.builtin.sass:color", "Generates new colors based on existing ones, making it easy to build color themes."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/color" }] }, { label: "sass:list", - documentation: localize11("scss.builtin.sass:list", "Lets you access and modify values in lists."), + documentation: _("scss.builtin.sass:list", "Lets you access and modify values in lists."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/list" }] }, { label: "sass:map", - documentation: localize11("scss.builtin.sass:map", "Makes it possible to look up the value associated with a key in a map, and much more."), + documentation: _("scss.builtin.sass:map", "Makes it possible to look up the value associated with a key in a map, and much more."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/map" }] }, { label: "sass:selector", - documentation: localize11("scss.builtin.sass:selector", "Provides access to Sass\u2019s powerful selector engine."), + documentation: _("scss.builtin.sass:selector", "Provides access to Sass\u2019s powerful selector engine."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/selector" }] }, { label: "sass:meta", - documentation: localize11("scss.builtin.sass:meta", "Exposes the details of Sass\u2019s inner workings."), + documentation: _("scss.builtin.sass:meta", "Exposes the details of Sass\u2019s inner workings."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/meta" }] } - ]; - return SCSSCompletion2; -}(CSSCompletion); -function addReferencesToDocumentation(items) { - items.forEach(function(i) { - if (i.documentation && i.references && i.references.length > 0) { - var markdownDoc = typeof i.documentation === "string" ? { kind: "markdown", value: i.documentation } : { kind: "markdown", value: i.documentation.value }; - markdownDoc.value += "\n\n"; - markdownDoc.value += i.references.map(function(r) { + ], t; +}(di); +function Vs(e) { + e.forEach(function(t) { + if (t.documentation && t.references && t.references.length > 0) { + var n = typeof t.documentation == "string" ? { kind: "markdown", value: t.documentation } : { kind: "markdown", value: t.documentation.value }; + n.value += ` + +`, n.value += t.references.map(function(r) { return "[".concat(r.name, "](").concat(r.url, ")"); - }).join(" | "); - i.documentation = markdownDoc; + }).join(" | "), t.documentation = n; } }); } -var __extends7 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); +var Dd = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(); -var _FSL3 = "/".charCodeAt(0); -var _NWL3 = "\n".charCodeAt(0); -var _CAR3 = "\r".charCodeAt(0); -var _LFD3 = "\f".charCodeAt(0); -var _TIC = "`".charCodeAt(0); -var _DOT3 = ".".charCodeAt(0); -var customTokenValue2 = TokenType.CustomToken; -var Ellipsis2 = customTokenValue2++; -var LESSScanner = function(_super) { - __extends7(LESSScanner2, _super); - function LESSScanner2() { - return _super !== null && _super.apply(this, arguments) || this; +}(), Us = "/".charCodeAt(0), Ed = ` +`.charCodeAt(0), Rd = "\r".charCodeAt(0), Ad = "\f".charCodeAt(0), ar = "`".charCodeAt(0), sr = ".".charCodeAt(0), zd = u.CustomToken, Jr = zd++, Mo = function(e) { + Dd(t, e); + function t() { + return e !== null && e.apply(this, arguments) || this; } - LESSScanner2.prototype.scanNext = function(offset) { - var tokenType = this.escapedJavaScript(); - if (tokenType !== null) { - return this.finishToken(offset, tokenType); - } - if (this.stream.advanceIfChars([_DOT3, _DOT3, _DOT3])) { - return this.finishToken(offset, Ellipsis2); - } - return _super.prototype.scanNext.call(this, offset); - }; - LESSScanner2.prototype.comment = function() { - if (_super.prototype.comment.call(this)) { - return true; - } - if (!this.inURL && this.stream.advanceIfChars([_FSL3, _FSL3])) { - this.stream.advanceWhileChar(function(ch) { - switch (ch) { - case _NWL3: - case _CAR3: - case _LFD3: - return false; - default: - return true; - } - }); - return true; - } else { - return false; - } - }; - LESSScanner2.prototype.escapedJavaScript = function() { - var ch = this.stream.peekChar(); - if (ch === _TIC) { - this.stream.advance(1); - this.stream.advanceWhileChar(function(ch2) { - return ch2 !== _TIC; - }); - return this.stream.advanceIfChar(_TIC) ? TokenType.EscapedJavaScript : TokenType.BadEscapedJavaScript; - } - return null; - }; - return LESSScanner2; -}(Scanner); -var __extends8 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); -var LESSParser = function(_super) { - __extends8(LESSParser2, _super); - function LESSParser2() { - return _super.call(this, new LESSScanner()) || this; - } - LESSParser2.prototype._parseStylesheetStatement = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - if (this.peek(TokenType.AtKeyword)) { - return this._parseVariableDeclaration() || this._parsePlugin() || _super.prototype._parseStylesheetAtStatement.call(this, isNested); - } - return this._tryParseMixinDeclaration() || this._tryParseMixinReference() || this._parseFunction() || this._parseRuleset(true); - }; - LESSParser2.prototype._parseImport = function() { - if (!this.peekKeyword("@import") && !this.peekKeyword("@import-once")) { - return null; - } - var node = this.create(Import); - this.consumeToken(); - if (this.accept(TokenType.ParenthesisL)) { - if (!this.accept(TokenType.Ident)) { - return this.finish(node, ParseError.IdentifierExpected, [TokenType.SemiColon]); + return t.prototype.scanNext = function(n) { + var r = this.escapedJavaScript(); + return r !== null ? this.finishToken(n, r) : this.stream.advanceIfChars([sr, sr, sr]) ? this.finishToken(n, Jr) : e.prototype.scanNext.call(this, n); + }, t.prototype.comment = function() { + return e.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Us, Us]) ? (this.stream.advanceWhileChar(function(n) { + switch (n) { + case Ed: + case Rd: + case Ad: + return !1; + default: + return !0; } - do { - if (!this.accept(TokenType.Comma)) { + }), !0) : !1; + }, t.prototype.escapedJavaScript = function() { + var n = this.stream.peekChar(); + return n === ar ? (this.stream.advance(1), this.stream.advanceWhileChar(function(r) { + return r !== ar; + }), this.stream.advanceIfChar(ar) ? u.EscapedJavaScript : u.BadEscapedJavaScript) : null; + }, t; +}(en), Md = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); + }; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; + } + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); + }; +}(), Nd = function(e) { + Md(t, e); + function t() { + return e.call(this, new Mo()) || this; + } + return t.prototype._parseStylesheetStatement = function(n) { + return n === void 0 && (n = !1), this.peek(u.AtKeyword) ? this._parseVariableDeclaration() || this._parsePlugin() || e.prototype._parseStylesheetAtStatement.call(this, n) : this._tryParseMixinDeclaration() || this._tryParseMixinReference() || this._parseFunction() || this._parseRuleset(!0); + }, t.prototype._parseImport = function() { + if (!this.peekKeyword("@import") && !this.peekKeyword("@import-once")) + return null; + var n = this.create(ii); + if (this.consumeToken(), this.accept(u.ParenthesisL)) { + if (!this.accept(u.Ident)) + return this.finish(n, v.IdentifierExpected, [u.SemiColon]); + do + if (!this.accept(u.Comma)) break; - } - } while (this.accept(TokenType.Ident)); - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.SemiColon]); - } + while (this.accept(u.Ident)); + if (!this.accept(u.ParenthesisR)) + return this.finish(n, v.RightParenthesisExpected, [u.SemiColon]); } - if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.URIOrStringExpected, [TokenType.SemiColon]); - } - if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) { - node.setMedialist(this._parseMediaQueryList()); - } - return this.finish(node); - }; - LESSParser2.prototype._parsePlugin = function() { - if (!this.peekKeyword("@plugin")) { + return !n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral()) ? this.finish(n, v.URIOrStringExpected, [u.SemiColon]) : (!this.peek(u.SemiColon) && !this.peek(u.EOF) && n.setMedialist(this._parseMediaQueryList()), this.finish(n)); + }, t.prototype._parsePlugin = function() { + if (!this.peekKeyword("@plugin")) return null; + var n = this.createNode(m.Plugin); + return this.consumeToken(), n.addChild(this._parseStringLiteral()) ? this.accept(u.SemiColon) ? this.finish(n) : this.finish(n, v.SemiColonExpected) : this.finish(n, v.StringLiteralExpected); + }, t.prototype._parseMediaQuery = function() { + var n = e.prototype._parseMediaQuery.call(this); + if (!n) { + var r = this.create(fo); + return r.addChild(this._parseVariable()) ? this.finish(r) : null; } - var node = this.createNode(NodeType.Plugin); - this.consumeToken(); - if (!node.addChild(this._parseStringLiteral())) { - return this.finish(node, ParseError.StringLiteralExpected); - } - if (!this.accept(TokenType.SemiColon)) { - return this.finish(node, ParseError.SemiColonExpected); - } - return this.finish(node); - }; - LESSParser2.prototype._parseMediaQuery = function() { - var node = _super.prototype._parseMediaQuery.call(this); - if (!node) { - var node_1 = this.create(MediaQuery); - if (node_1.addChild(this._parseVariable())) { - return this.finish(node_1); - } - return null; - } - return node; - }; - LESSParser2.prototype._parseMediaDeclaration = function(isNested) { - if (isNested === void 0) { - isNested = false; - } - return this._tryParseRuleset(isNested) || this._tryToParseDeclaration() || this._tryParseMixinDeclaration() || this._tryParseMixinReference() || this._parseDetachedRuleSetMixin() || this._parseStylesheetStatement(isNested); - }; - LESSParser2.prototype._parseMediaFeatureName = function() { + return n; + }, t.prototype._parseMediaDeclaration = function(n) { + return n === void 0 && (n = !1), this._tryParseRuleset(n) || this._tryToParseDeclaration() || this._tryParseMixinDeclaration() || this._tryParseMixinReference() || this._parseDetachedRuleSetMixin() || this._parseStylesheetStatement(n); + }, t.prototype._parseMediaFeatureName = function() { return this._parseIdent() || this._parseVariable(); - }; - LESSParser2.prototype._parseVariableDeclaration = function(panic) { - if (panic === void 0) { - panic = []; - } - var node = this.create(VariableDeclaration); - var mark = this.mark(); - if (!node.setVariable(this._parseVariable(true))) { + }, t.prototype._parseVariableDeclaration = function(n) { + n === void 0 && (n = []); + var r = this.create(Vn), i = this.mark(); + if (!r.setVariable(this._parseVariable(!0))) return null; - } - if (this.accept(TokenType.Colon)) { - if (this.prevToken) { - node.colonPosition = this.prevToken.offset; - } - if (node.setValue(this._parseDetachedRuleSet())) { - node.needsSemicolon = false; - } else if (!node.setValue(this._parseExpr())) { - return this.finish(node, ParseError.VariableValueExpected, [], panic); - } - node.addChild(this._parsePrio()); - } else { - this.restoreAtMark(mark); + if (this.accept(u.Colon)) { + if (this.prevToken && (r.colonPosition = this.prevToken.offset), r.setValue(this._parseDetachedRuleSet())) + r.needsSemicolon = !1; + else if (!r.setValue(this._parseExpr())) + return this.finish(r, v.VariableValueExpected, [], n); + r.addChild(this._parsePrio()); + } else + return this.restoreAtMark(i), null; + return this.peek(u.SemiColon) && (r.semicolonPosition = this.token.offset), this.finish(r); + }, t.prototype._parseDetachedRuleSet = function() { + var n = this.mark(); + if (this.peekDelim("#") || this.peekDelim(".")) + if (this.consumeToken(), !this.hasWhitespace() && this.accept(u.ParenthesisL)) { + var r = this.create($t); + if (r.getParameters().addChild(this._parseMixinParameter())) + for (; (this.accept(u.Comma) || this.accept(u.SemiColon)) && !this.peek(u.ParenthesisR); ) + r.getParameters().addChild(this._parseMixinParameter()) || this.markError(r, v.IdentifierExpected, [], [u.ParenthesisR]); + if (!this.accept(u.ParenthesisR)) + return this.restoreAtMark(n), null; + } else + return this.restoreAtMark(n), null; + if (!this.peek(u.CurlyL)) return null; - } - if (this.peek(TokenType.SemiColon)) { - node.semicolonPosition = this.token.offset; - } - return this.finish(node); - }; - LESSParser2.prototype._parseDetachedRuleSet = function() { - var mark = this.mark(); - if (this.peekDelim("#") || this.peekDelim(".")) { - this.consumeToken(); - if (!this.hasWhitespace() && this.accept(TokenType.ParenthesisL)) { - var node = this.create(MixinDeclaration); - if (node.getParameters().addChild(this._parseMixinParameter())) { - while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getParameters().addChild(this._parseMixinParameter())) { - this.markError(node, ParseError.IdentifierExpected, [], [TokenType.ParenthesisR]); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - this.restoreAtMark(mark); - return null; - } - } else { - this.restoreAtMark(mark); - return null; - } - } - if (!this.peek(TokenType.CurlyL)) { - return null; - } - var content = this.create(BodyDeclaration); - this._parseBody(content, this._parseDetachedRuleSetBody.bind(this)); - return this.finish(content); - }; - LESSParser2.prototype._parseDetachedRuleSetBody = function() { + var i = this.create(ne); + return this._parseBody(i, this._parseDetachedRuleSetBody.bind(this)), this.finish(i); + }, t.prototype._parseDetachedRuleSetBody = function() { return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration(); - }; - LESSParser2.prototype._addLookupChildren = function(node) { - if (!node.addChild(this._parseLookupValue())) { - return false; - } - var expectsValue = false; - while (true) { - if (this.peek(TokenType.BracketL)) { - expectsValue = true; - } - if (!node.addChild(this._parseLookupValue())) { - break; - } - expectsValue = false; - } - return !expectsValue; - }; - LESSParser2.prototype._parseLookupValue = function() { - var node = this.create(Node); - var mark = this.mark(); - if (!this.accept(TokenType.BracketL)) { - this.restoreAtMark(mark); + }, t.prototype._addLookupChildren = function(n) { + if (!n.addChild(this._parseLookupValue())) + return !1; + for (var r = !1; this.peek(u.BracketL) && (r = !0), !!n.addChild(this._parseLookupValue()); ) + r = !1; + return !r; + }, t.prototype._parseLookupValue = function() { + var n = this.create(L), r = this.mark(); + return this.accept(u.BracketL) ? (n.addChild(this._parseVariable(!1, !0)) || n.addChild(this._parsePropertyIdentifier())) && this.accept(u.BracketR) || this.accept(u.BracketR) ? n : (this.restoreAtMark(r), null) : (this.restoreAtMark(r), null); + }, t.prototype._parseVariable = function(n, r) { + n === void 0 && (n = !1), r === void 0 && (r = !1); + var i = !n && this.peekDelim("$"); + if (!this.peekDelim("@") && !i && !this.peek(u.AtKeyword)) return null; - } - if ((node.addChild(this._parseVariable(false, true)) || node.addChild(this._parsePropertyIdentifier())) && this.accept(TokenType.BracketR) || this.accept(TokenType.BracketR)) { - return node; - } - this.restoreAtMark(mark); - return null; - }; - LESSParser2.prototype._parseVariable = function(declaration, insideLookup) { - if (declaration === void 0) { - declaration = false; - } - if (insideLookup === void 0) { - insideLookup = false; - } - var isPropertyReference = !declaration && this.peekDelim("$"); - if (!this.peekDelim("@") && !isPropertyReference && !this.peek(TokenType.AtKeyword)) { - return null; - } - var node = this.create(Variable); - var mark = this.mark(); - while (this.acceptDelim("@") || !declaration && this.acceptDelim("$")) { - if (this.hasWhitespace()) { - this.restoreAtMark(mark); - return null; - } - } - if (!this.accept(TokenType.AtKeyword) && !this.accept(TokenType.Ident)) { - this.restoreAtMark(mark); - return null; - } - if (!insideLookup && this.peek(TokenType.BracketL)) { - if (!this._addLookupChildren(node)) { - this.restoreAtMark(mark); - return null; - } - } - return node; - }; - LESSParser2.prototype._parseTermExpression = function() { - return this._parseVariable() || this._parseEscaped() || _super.prototype._parseTermExpression.call(this) || this._tryParseMixinReference(false); - }; - LESSParser2.prototype._parseEscaped = function() { - if (this.peek(TokenType.EscapedJavaScript) || this.peek(TokenType.BadEscapedJavaScript)) { - var node = this.createNode(NodeType.EscapedValue); - this.consumeToken(); - return this.finish(node); + for (var a = this.create(li), o = this.mark(); this.acceptDelim("@") || !n && this.acceptDelim("$"); ) + if (this.hasWhitespace()) + return this.restoreAtMark(o), null; + return !this.accept(u.AtKeyword) && !this.accept(u.Ident) ? (this.restoreAtMark(o), null) : !r && this.peek(u.BracketL) && !this._addLookupChildren(a) ? (this.restoreAtMark(o), null) : a; + }, t.prototype._parseTermExpression = function() { + return this._parseVariable() || this._parseEscaped() || e.prototype._parseTermExpression.call(this) || this._tryParseMixinReference(!1); + }, t.prototype._parseEscaped = function() { + if (this.peek(u.EscapedJavaScript) || this.peek(u.BadEscapedJavaScript)) { + var n = this.createNode(m.EscapedValue); + return this.consumeToken(), this.finish(n); } if (this.peekDelim("~")) { - var node = this.createNode(NodeType.EscapedValue); - this.consumeToken(); - if (this.accept(TokenType.String) || this.accept(TokenType.EscapedJavaScript)) { - return this.finish(node); - } else { - return this.finish(node, ParseError.TermExpected); - } + var n = this.createNode(m.EscapedValue); + return this.consumeToken(), this.accept(u.String) || this.accept(u.EscapedJavaScript) ? this.finish(n) : this.finish(n, v.TermExpected); } return null; - }; - LESSParser2.prototype._parseOperator = function() { - var node = this._parseGuardOperator(); - if (node) { - return node; - } else { - return _super.prototype._parseOperator.call(this); - } - }; - LESSParser2.prototype._parseGuardOperator = function() { + }, t.prototype._parseOperator = function() { + var n = this._parseGuardOperator(); + return n || e.prototype._parseOperator.call(this); + }, t.prototype._parseGuardOperator = function() { if (this.peekDelim(">")) { - var node = this.createNode(NodeType.Operator); - this.consumeToken(); - this.acceptDelim("="); - return node; + var n = this.createNode(m.Operator); + return this.consumeToken(), this.acceptDelim("="), n; } else if (this.peekDelim("=")) { - var node = this.createNode(NodeType.Operator); - this.consumeToken(); - this.acceptDelim("<"); - return node; + var n = this.createNode(m.Operator); + return this.consumeToken(), this.acceptDelim("<"), n; } else if (this.peekDelim("<")) { - var node = this.createNode(NodeType.Operator); - this.consumeToken(); - this.acceptDelim("="); - return node; + var n = this.createNode(m.Operator); + return this.consumeToken(), this.acceptDelim("="), n; } return null; - }; - LESSParser2.prototype._parseRuleSetDeclaration = function() { - if (this.peek(TokenType.AtKeyword)) { - return this._parseKeyframe() || this._parseMedia(true) || this._parseImport() || this._parseSupports(true) || this._parseDetachedRuleSetMixin() || this._parseVariableDeclaration() || _super.prototype._parseRuleSetDeclarationAtStatement.call(this); - } - return this._tryParseMixinDeclaration() || this._tryParseRuleset(true) || this._tryParseMixinReference() || this._parseFunction() || this._parseExtend() || _super.prototype._parseRuleSetDeclaration.call(this); - }; - LESSParser2.prototype._parseKeyframeIdent = function() { - return this._parseIdent([ReferenceType.Keyframe]) || this._parseVariable(); - }; - LESSParser2.prototype._parseKeyframeSelector = function() { - return this._parseDetachedRuleSetMixin() || _super.prototype._parseKeyframeSelector.call(this); - }; - LESSParser2.prototype._parseSimpleSelectorBody = function() { - return this._parseSelectorCombinator() || _super.prototype._parseSimpleSelectorBody.call(this); - }; - LESSParser2.prototype._parseSelector = function(isNested) { - var node = this.create(Selector); - var hasContent = false; - if (isNested) { - hasContent = node.addChild(this._parseCombinator()); - } - while (node.addChild(this._parseSimpleSelector())) { - hasContent = true; - var mark = this.mark(); - if (node.addChild(this._parseGuard()) && this.peek(TokenType.CurlyL)) { + }, t.prototype._parseRuleSetDeclaration = function() { + return this.peek(u.AtKeyword) ? this._parseKeyframe() || this._parseMedia(!0) || this._parseImport() || this._parseSupports(!0) || this._parseDetachedRuleSetMixin() || this._parseVariableDeclaration() || e.prototype._parseRuleSetDeclarationAtStatement.call(this) : this._tryParseMixinDeclaration() || this._tryParseRuleset(!0) || this._tryParseMixinReference() || this._parseFunction() || this._parseExtend() || e.prototype._parseRuleSetDeclaration.call(this); + }, t.prototype._parseKeyframeIdent = function() { + return this._parseIdent([G.Keyframe]) || this._parseVariable(); + }, t.prototype._parseKeyframeSelector = function() { + return this._parseDetachedRuleSetMixin() || e.prototype._parseKeyframeSelector.call(this); + }, t.prototype._parseSimpleSelectorBody = function() { + return this._parseSelectorCombinator() || e.prototype._parseSimpleSelectorBody.call(this); + }, t.prototype._parseSelector = function(n) { + var r = this.create(tn), i = !1; + for (n && (i = r.addChild(this._parseCombinator())); r.addChild(this._parseSimpleSelector()); ) { + i = !0; + var a = this.mark(); + if (r.addChild(this._parseGuard()) && this.peek(u.CurlyL)) break; - } - this.restoreAtMark(mark); - node.addChild(this._parseCombinator()); + this.restoreAtMark(a), r.addChild(this._parseCombinator()); } - return hasContent ? this.finish(node) : null; - }; - LESSParser2.prototype._parseSelectorCombinator = function() { + return i ? this.finish(r) : null; + }, t.prototype._parseSelectorCombinator = function() { if (this.peekDelim("&")) { - var node = this.createNode(NodeType.SelectorCombinator); - this.consumeToken(); - while (!this.hasWhitespace() && (this.acceptDelim("-") || this.accept(TokenType.Num) || this.accept(TokenType.Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim("&"))) { - } - return this.finish(node); + var n = this.createNode(m.SelectorCombinator); + for (this.consumeToken(); !this.hasWhitespace() && (this.acceptDelim("-") || this.accept(u.Num) || this.accept(u.Dimension) || n.addChild(this._parseIdent()) || this.acceptDelim("&")); ) + ; + return this.finish(n); } return null; - }; - LESSParser2.prototype._parseSelectorIdent = function() { - if (!this.peekInterpolatedIdent()) { + }, t.prototype._parseSelectorIdent = function() { + if (!this.peekInterpolatedIdent()) return null; - } - var node = this.createNode(NodeType.SelectorInterpolation); - var hasContent = this._acceptInterpolatedIdent(node); - return hasContent ? this.finish(node) : null; - }; - LESSParser2.prototype._parsePropertyIdentifier = function(inLookup) { - if (inLookup === void 0) { - inLookup = false; - } - var propertyRegex = /^[\w-]+/; - if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, propertyRegex)) { + var n = this.createNode(m.SelectorInterpolation), r = this._acceptInterpolatedIdent(n); + return r ? this.finish(n) : null; + }, t.prototype._parsePropertyIdentifier = function(n) { + n === void 0 && (n = !1); + var r = /^[\w-]+/; + if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, r)) return null; - } - var mark = this.mark(); - var node = this.create(Identifier); - node.isCustomProperty = this.acceptDelim("-") && this.acceptDelim("-"); - var childAdded = false; - if (!inLookup) { - if (node.isCustomProperty) { - childAdded = this._acceptInterpolatedIdent(node); - } else { - childAdded = this._acceptInterpolatedIdent(node, propertyRegex); - } - } else { - if (node.isCustomProperty) { - childAdded = node.addChild(this._parseIdent()); - } else { - childAdded = node.addChild(this._parseRegexp(propertyRegex)); - } - } - if (!childAdded) { - this.restoreAtMark(mark); - return null; - } - if (!inLookup && !this.hasWhitespace()) { - this.acceptDelim("+"); - if (!this.hasWhitespace()) { - this.acceptIdent("_"); - } - } - return this.finish(node); - }; - LESSParser2.prototype.peekInterpolatedIdent = function() { - return this.peek(TokenType.Ident) || this.peekDelim("@") || this.peekDelim("$") || this.peekDelim("-"); - }; - LESSParser2.prototype._acceptInterpolatedIdent = function(node, identRegex) { - var _this = this; - var hasContent = false; - var indentInterpolation = function() { - var pos = _this.mark(); - if (_this.acceptDelim("-")) { - if (!_this.hasWhitespace()) { - _this.acceptDelim("-"); - } - if (_this.hasWhitespace()) { - _this.restoreAtMark(pos); - return null; - } - } - return _this._parseInterpolation(); - }; - var accept = identRegex ? function() { - return _this.acceptRegexp(identRegex); + var i = this.mark(), a = this.create(Re); + a.isCustomProperty = this.acceptDelim("-") && this.acceptDelim("-"); + var o = !1; + return n ? a.isCustomProperty ? o = a.addChild(this._parseIdent()) : o = a.addChild(this._parseRegexp(r)) : a.isCustomProperty ? o = this._acceptInterpolatedIdent(a) : o = this._acceptInterpolatedIdent(a, r), o ? (!n && !this.hasWhitespace() && (this.acceptDelim("+"), this.hasWhitespace() || this.acceptIdent("_")), this.finish(a)) : (this.restoreAtMark(i), null); + }, t.prototype.peekInterpolatedIdent = function() { + return this.peek(u.Ident) || this.peekDelim("@") || this.peekDelim("$") || this.peekDelim("-"); + }, t.prototype._acceptInterpolatedIdent = function(n, r) { + for (var i = this, a = !1, o = function() { + var h = i.mark(); + return i.acceptDelim("-") && (i.hasWhitespace() || i.acceptDelim("-"), i.hasWhitespace()) ? (i.restoreAtMark(h), null) : i._parseInterpolation(); + }, l = r ? function() { + return i.acceptRegexp(r); } : function() { - return _this.accept(TokenType.Ident); - }; - while (accept() || node.addChild(this._parseInterpolation() || this.try(indentInterpolation))) { - hasContent = true; - if (this.hasWhitespace()) { - break; - } - } - return hasContent; - }; - LESSParser2.prototype._parseInterpolation = function() { - var mark = this.mark(); - if (this.peekDelim("@") || this.peekDelim("$")) { - var node = this.createNode(NodeType.Interpolation); - this.consumeToken(); - if (this.hasWhitespace() || !this.accept(TokenType.CurlyL)) { - this.restoreAtMark(mark); - return null; - } - if (!node.addChild(this._parseIdent())) { - return this.finish(node, ParseError.IdentifierExpected); - } - if (!this.accept(TokenType.CurlyR)) { - return this.finish(node, ParseError.RightCurlyExpected); - } - return this.finish(node); - } - return null; - }; - LESSParser2.prototype._tryParseMixinDeclaration = function() { - var mark = this.mark(); - var node = this.create(MixinDeclaration); - if (!node.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(TokenType.ParenthesisL)) { - this.restoreAtMark(mark); - return null; - } - if (node.getParameters().addChild(this._parseMixinParameter())) { - while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getParameters().addChild(this._parseMixinParameter())) { - this.markError(node, ParseError.IdentifierExpected, [], [TokenType.ParenthesisR]); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - this.restoreAtMark(mark); - return null; - } - node.setGuard(this._parseGuard()); - if (!this.peek(TokenType.CurlyL)) { - this.restoreAtMark(mark); - return null; - } - return this._parseBody(node, this._parseMixInBodyDeclaration.bind(this)); - }; - LESSParser2.prototype._parseMixInBodyDeclaration = function() { - return this._parseFontFace() || this._parseRuleSetDeclaration(); - }; - LESSParser2.prototype._parseMixinDeclarationIdentifier = function() { - var identifier; - if (this.peekDelim("#") || this.peekDelim(".")) { - identifier = this.create(Identifier); - this.consumeToken(); - if (this.hasWhitespace() || !identifier.addChild(this._parseIdent())) { - return null; - } - } else if (this.peek(TokenType.Hash)) { - identifier = this.create(Identifier); - this.consumeToken(); - } else { - return null; - } - identifier.referenceTypes = [ReferenceType.Mixin]; - return this.finish(identifier); - }; - LESSParser2.prototype._parsePseudo = function() { - if (!this.peek(TokenType.Colon)) { - return null; - } - var mark = this.mark(); - var node = this.create(ExtendsReference); - this.consumeToken(); - if (this.acceptIdent("extend")) { - return this._completeExtends(node); - } - this.restoreAtMark(mark); - return _super.prototype._parsePseudo.call(this); - }; - LESSParser2.prototype._parseExtend = function() { - if (!this.peekDelim("&")) { - return null; - } - var mark = this.mark(); - var node = this.create(ExtendsReference); - this.consumeToken(); - if (this.hasWhitespace() || !this.accept(TokenType.Colon) || !this.acceptIdent("extend")) { - this.restoreAtMark(mark); - return null; - } - return this._completeExtends(node); - }; - LESSParser2.prototype._completeExtends = function(node) { - if (!this.accept(TokenType.ParenthesisL)) { - return this.finish(node, ParseError.LeftParenthesisExpected); - } - var selectors = node.getSelectors(); - if (!selectors.addChild(this._parseSelector(true))) { - return this.finish(node, ParseError.SelectorExpected); - } - while (this.accept(TokenType.Comma)) { - if (!selectors.addChild(this._parseSelector(true))) { - return this.finish(node, ParseError.SelectorExpected); - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - return this.finish(node); - }; - LESSParser2.prototype._parseDetachedRuleSetMixin = function() { - if (!this.peek(TokenType.AtKeyword)) { - return null; - } - var mark = this.mark(); - var node = this.create(MixinReference); - if (node.addChild(this._parseVariable(true)) && (this.hasWhitespace() || !this.accept(TokenType.ParenthesisL))) { - this.restoreAtMark(mark); - return null; - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - return this.finish(node); - }; - LESSParser2.prototype._tryParseMixinReference = function(atRoot) { - if (atRoot === void 0) { - atRoot = true; - } - var mark = this.mark(); - var node = this.create(MixinReference); - var identifier = this._parseMixinDeclarationIdentifier(); - while (identifier) { - this.acceptDelim(">"); - var nextId = this._parseMixinDeclarationIdentifier(); - if (nextId) { - node.getNamespaces().addChild(identifier); - identifier = nextId; - } else { - break; - } - } - if (!node.setIdentifier(identifier)) { - this.restoreAtMark(mark); - return null; - } - var hasArguments = false; - if (this.accept(TokenType.ParenthesisL)) { - hasArguments = true; - if (node.getArguments().addChild(this._parseMixinArgument())) { - while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getArguments().addChild(this._parseMixinArgument())) { - return this.finish(node, ParseError.ExpressionExpected); - } - } - } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); - } - identifier.referenceTypes = [ReferenceType.Mixin]; - } else { - identifier.referenceTypes = [ReferenceType.Mixin, ReferenceType.Rule]; - } - if (this.peek(TokenType.BracketL)) { - if (!atRoot) { - this._addLookupChildren(node); - } - } else { - node.addChild(this._parsePrio()); - } - if (!hasArguments && !this.peek(TokenType.SemiColon) && !this.peek(TokenType.CurlyR) && !this.peek(TokenType.EOF)) { - this.restoreAtMark(mark); - return null; - } - return this.finish(node); - }; - LESSParser2.prototype._parseMixinArgument = function() { - var node = this.create(FunctionArgument); - var pos = this.mark(); - var argument = this._parseVariable(); - if (argument) { - if (!this.accept(TokenType.Colon)) { - this.restoreAtMark(pos); - } else { - node.setIdentifier(argument); - } - } - if (node.setValue(this._parseDetachedRuleSet() || this._parseExpr(true))) { - return this.finish(node); - } - this.restoreAtMark(pos); - return null; - }; - LESSParser2.prototype._parseMixinParameter = function() { - var node = this.create(FunctionParameter); - if (this.peekKeyword("@rest")) { - var restNode = this.create(Node); - this.consumeToken(); - if (!this.accept(Ellipsis2)) { - return this.finish(node, ParseError.DotExpected, [], [TokenType.Comma, TokenType.ParenthesisR]); - } - node.setIdentifier(this.finish(restNode)); - return this.finish(node); - } - if (this.peek(Ellipsis2)) { - var varargsNode = this.create(Node); - this.consumeToken(); - node.setIdentifier(this.finish(varargsNode)); - return this.finish(node); - } - var hasContent = false; - if (node.setIdentifier(this._parseVariable())) { - this.accept(TokenType.Colon); - hasContent = true; - } - if (!node.setDefaultValue(this._parseDetachedRuleSet() || this._parseExpr(true)) && !hasContent) { - return null; - } - return this.finish(node); - }; - LESSParser2.prototype._parseGuard = function() { - if (!this.peekIdent("when")) { - return null; - } - var node = this.create(LessGuard); - this.consumeToken(); - node.isNegated = this.acceptIdent("not"); - if (!node.getConditions().addChild(this._parseGuardCondition())) { - return this.finish(node, ParseError.ConditionExpected); - } - while (this.acceptIdent("and") || this.accept(TokenType.Comma)) { - if (!node.getConditions().addChild(this._parseGuardCondition())) { - return this.finish(node, ParseError.ConditionExpected); - } - } - return this.finish(node); - }; - LESSParser2.prototype._parseGuardCondition = function() { - if (!this.peek(TokenType.ParenthesisL)) { - return null; - } - var node = this.create(GuardCondition); - this.consumeToken(); - if (!node.addChild(this._parseExpr())) + return i.accept(u.Ident); + }; (l() || n.addChild(this._parseInterpolation() || this.try(o))) && (a = !0, !this.hasWhitespace()); ) ; - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); + return a; + }, t.prototype._parseInterpolation = function() { + var n = this.mark(); + if (this.peekDelim("@") || this.peekDelim("$")) { + var r = this.createNode(m.Interpolation); + return this.consumeToken(), this.hasWhitespace() || !this.accept(u.CurlyL) ? (this.restoreAtMark(n), null) : r.addChild(this._parseIdent()) ? this.accept(u.CurlyR) ? this.finish(r) : this.finish(r, v.RightCurlyExpected) : this.finish(r, v.IdentifierExpected); } - return this.finish(node); - }; - LESSParser2.prototype._parseFunction = function() { - var pos = this.mark(); - var node = this.create(Function); - if (!node.setIdentifier(this._parseFunctionIdentifier())) { + return null; + }, t.prototype._tryParseMixinDeclaration = function() { + var n = this.mark(), r = this.create($t); + if (!r.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(u.ParenthesisL)) + return this.restoreAtMark(n), null; + if (r.getParameters().addChild(this._parseMixinParameter())) + for (; (this.accept(u.Comma) || this.accept(u.SemiColon)) && !this.peek(u.ParenthesisR); ) + r.getParameters().addChild(this._parseMixinParameter()) || this.markError(r, v.IdentifierExpected, [], [u.ParenthesisR]); + return this.accept(u.ParenthesisR) ? (r.setGuard(this._parseGuard()), this.peek(u.CurlyL) ? this._parseBody(r, this._parseMixInBodyDeclaration.bind(this)) : (this.restoreAtMark(n), null)) : (this.restoreAtMark(n), null); + }, t.prototype._parseMixInBodyDeclaration = function() { + return this._parseFontFace() || this._parseRuleSetDeclaration(); + }, t.prototype._parseMixinDeclarationIdentifier = function() { + var n; + if (this.peekDelim("#") || this.peekDelim(".")) { + if (n = this.create(Re), this.consumeToken(), this.hasWhitespace() || !n.addChild(this._parseIdent())) + return null; + } else if (this.peek(u.Hash)) + n = this.create(Re), this.consumeToken(); + else return null; - } - if (this.hasWhitespace() || !this.accept(TokenType.ParenthesisL)) { - this.restoreAtMark(pos); + return n.referenceTypes = [G.Mixin], this.finish(n); + }, t.prototype._parsePseudo = function() { + if (!this.peek(u.Colon)) return null; + var n = this.mark(), r = this.create(qt); + return this.consumeToken(), this.acceptIdent("extend") ? this._completeExtends(r) : (this.restoreAtMark(n), e.prototype._parsePseudo.call(this)); + }, t.prototype._parseExtend = function() { + if (!this.peekDelim("&")) + return null; + var n = this.mark(), r = this.create(qt); + return this.consumeToken(), this.hasWhitespace() || !this.accept(u.Colon) || !this.acceptIdent("extend") ? (this.restoreAtMark(n), null) : this._completeExtends(r); + }, t.prototype._completeExtends = function(n) { + if (!this.accept(u.ParenthesisL)) + return this.finish(n, v.LeftParenthesisExpected); + var r = n.getSelectors(); + if (!r.addChild(this._parseSelector(!0))) + return this.finish(n, v.SelectorExpected); + for (; this.accept(u.Comma); ) + if (!r.addChild(this._parseSelector(!0))) + return this.finish(n, v.SelectorExpected); + return this.accept(u.ParenthesisR) ? this.finish(n) : this.finish(n, v.RightParenthesisExpected); + }, t.prototype._parseDetachedRuleSetMixin = function() { + if (!this.peek(u.AtKeyword)) + return null; + var n = this.mark(), r = this.create(Fn); + return r.addChild(this._parseVariable(!0)) && (this.hasWhitespace() || !this.accept(u.ParenthesisL)) ? (this.restoreAtMark(n), null) : this.accept(u.ParenthesisR) ? this.finish(r) : this.finish(r, v.RightParenthesisExpected); + }, t.prototype._tryParseMixinReference = function(n) { + n === void 0 && (n = !0); + for (var r = this.mark(), i = this.create(Fn), a = this._parseMixinDeclarationIdentifier(); a; ) { + this.acceptDelim(">"); + var o = this._parseMixinDeclarationIdentifier(); + if (o) + i.getNamespaces().addChild(a), a = o; + else + break; } - if (node.getArguments().addChild(this._parseMixinArgument())) { - while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) { - if (this.peek(TokenType.ParenthesisR)) { - break; - } - if (!node.getArguments().addChild(this._parseMixinArgument())) { - return this.finish(node, ParseError.ExpressionExpected); - } + if (!i.setIdentifier(a)) + return this.restoreAtMark(r), null; + var l = !1; + if (this.accept(u.ParenthesisL)) { + if (l = !0, i.getArguments().addChild(this._parseMixinArgument())) { + for (; (this.accept(u.Comma) || this.accept(u.SemiColon)) && !this.peek(u.ParenthesisR); ) + if (!i.getArguments().addChild(this._parseMixinArgument())) + return this.finish(i, v.ExpressionExpected); } + if (!this.accept(u.ParenthesisR)) + return this.finish(i, v.RightParenthesisExpected); + a.referenceTypes = [G.Mixin]; + } else + a.referenceTypes = [G.Mixin, G.Rule]; + return this.peek(u.BracketL) ? n || this._addLookupChildren(i) : i.addChild(this._parsePrio()), !l && !this.peek(u.SemiColon) && !this.peek(u.CurlyR) && !this.peek(u.EOF) ? (this.restoreAtMark(r), null) : this.finish(i); + }, t.prototype._parseMixinArgument = function() { + var n = this.create(Dt), r = this.mark(), i = this._parseVariable(); + return i && (this.accept(u.Colon) ? n.setIdentifier(i) : this.restoreAtMark(r)), n.setValue(this._parseDetachedRuleSet() || this._parseExpr(!0)) ? this.finish(n) : (this.restoreAtMark(r), null); + }, t.prototype._parseMixinParameter = function() { + var n = this.create(On); + if (this.peekKeyword("@rest")) { + var r = this.create(L); + return this.consumeToken(), this.accept(Jr) ? (n.setIdentifier(this.finish(r)), this.finish(n)) : this.finish(n, v.DotExpected, [], [u.Comma, u.ParenthesisR]); } - if (!this.accept(TokenType.ParenthesisR)) { - return this.finish(node, ParseError.RightParenthesisExpected); + if (this.peek(Jr)) { + var i = this.create(L); + return this.consumeToken(), n.setIdentifier(this.finish(i)), this.finish(n); } - return this.finish(node); - }; - LESSParser2.prototype._parseFunctionIdentifier = function() { + var a = !1; + return n.setIdentifier(this._parseVariable()) && (this.accept(u.Colon), a = !0), !n.setDefaultValue(this._parseDetachedRuleSet() || this._parseExpr(!0)) && !a ? null : this.finish(n); + }, t.prototype._parseGuard = function() { + if (!this.peekIdent("when")) + return null; + var n = this.create(ch); + if (this.consumeToken(), n.isNegated = this.acceptIdent("not"), !n.getConditions().addChild(this._parseGuardCondition())) + return this.finish(n, v.ConditionExpected); + for (; this.acceptIdent("and") || this.accept(u.Comma); ) + if (!n.getConditions().addChild(this._parseGuardCondition())) + return this.finish(n, v.ConditionExpected); + return this.finish(n); + }, t.prototype._parseGuardCondition = function() { + if (!this.peek(u.ParenthesisL)) + return null; + var n = this.create(hh); + return this.consumeToken(), n.addChild(this._parseExpr()), this.accept(u.ParenthesisR) ? this.finish(n) : this.finish(n, v.RightParenthesisExpected); + }, t.prototype._parseFunction = function() { + var n = this.mark(), r = this.create(nn); + if (!r.setIdentifier(this._parseFunctionIdentifier())) + return null; + if (this.hasWhitespace() || !this.accept(u.ParenthesisL)) + return this.restoreAtMark(n), null; + if (r.getArguments().addChild(this._parseMixinArgument())) { + for (; (this.accept(u.Comma) || this.accept(u.SemiColon)) && !this.peek(u.ParenthesisR); ) + if (!r.getArguments().addChild(this._parseMixinArgument())) + return this.finish(r, v.ExpressionExpected); + } + return this.accept(u.ParenthesisR) ? this.finish(r) : this.finish(r, v.RightParenthesisExpected); + }, t.prototype._parseFunctionIdentifier = function() { if (this.peekDelim("%")) { - var node = this.create(Identifier); - node.referenceTypes = [ReferenceType.Function]; - this.consumeToken(); - return this.finish(node); + var n = this.create(Re); + return n.referenceTypes = [G.Function], this.consumeToken(), this.finish(n); } - return _super.prototype._parseFunctionIdentifier.call(this); - }; - LESSParser2.prototype._parseURLArgument = function() { - var pos = this.mark(); - var node = _super.prototype._parseURLArgument.call(this); - if (!node || !this.peek(TokenType.ParenthesisR)) { - this.restoreAtMark(pos); - var node_2 = this.create(Node); - node_2.addChild(this._parseBinaryExpr()); - return this.finish(node_2); + return e.prototype._parseFunctionIdentifier.call(this); + }, t.prototype._parseURLArgument = function() { + var n = this.mark(), r = e.prototype._parseURLArgument.call(this); + if (!r || !this.peek(u.ParenthesisR)) { + this.restoreAtMark(n); + var i = this.create(L); + return i.addChild(this._parseBinaryExpr()), this.finish(i); } - return node; + return r; + }, t; +}(ci), Pd = function() { + var e = function(t, n) { + return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { + r.__proto__ = i; + } || function(r, i) { + for (var a in i) + Object.prototype.hasOwnProperty.call(i, a) && (r[a] = i[a]); + }, e(t, n); }; - return LESSParser2; -}(Parser); -var __extends9 = function() { - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); - }; - return function(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; + return function(t, n) { + if (typeof n != "function" && n !== null) + throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); + e(t, n); + function r() { + this.constructor = t; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(); -var localize12 = loadMessageBundle(); -var LESSCompletion = function(_super) { - __extends9(LESSCompletion2, _super); - function LESSCompletion2(lsOptions, cssDataManager) { - return _super.call(this, "@", lsOptions, cssDataManager) || this; +}(), W = Le(), Id = function(e) { + Pd(t, e); + function t(n, r) { + return e.call(this, "@", n, r) || this; } - LESSCompletion2.prototype.createFunctionProposals = function(proposals, existingNode, sortToEnd, result) { - for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) { - var p = proposals_1[_i]; - var item = { - label: p.name, - detail: p.example, - documentation: p.description, - textEdit: TextEdit.replace(this.getCompletionRange(existingNode), p.name + "($0)"), - insertTextFormat: InsertTextFormat.Snippet, - kind: CompletionItemKind.Function + return t.prototype.createFunctionProposals = function(n, r, i, a) { + for (var o = 0, l = n; o < l.length; o++) { + var h = l[o], c = { + label: h.name, + detail: h.example, + documentation: h.description, + textEdit: B.replace(this.getCompletionRange(r), h.name + "($0)"), + insertTextFormat: ke.Snippet, + kind: V.Function }; - if (sortToEnd) { - item.sortText = "z"; - } - result.items.push(item); + i && (c.sortText = "z"), a.items.push(c); } - return result; - }; - LESSCompletion2.prototype.getTermProposals = function(entry, existingNode, result) { - var functions = LESSCompletion2.builtInProposals; - if (entry) { - functions = functions.filter(function(f2) { - return !f2.type || !entry.restrictions || entry.restrictions.indexOf(f2.type) !== -1; - }); + return a; + }, t.prototype.getTermProposals = function(n, r, i) { + var a = t.builtInProposals; + return n && (a = a.filter(function(o) { + return !o.type || !n.restrictions || n.restrictions.indexOf(o.type) !== -1; + })), this.createFunctionProposals(a, r, !0, i), e.prototype.getTermProposals.call(this, n, r, i); + }, t.prototype.getColorProposals = function(n, r, i) { + return this.createFunctionProposals(t.colorProposals, r, !1, i), e.prototype.getColorProposals.call(this, n, r, i); + }, t.prototype.getCompletionsForDeclarationProperty = function(n, r) { + return this.getCompletionsForSelector(null, !0, r), e.prototype.getCompletionsForDeclarationProperty.call(this, n, r); + }, t.builtInProposals = [ + { + name: "if", + example: "if(condition, trueValue [, falseValue]);", + description: W("less.builtin.if", "returns one of two values depending on a condition.") + }, + { + name: "boolean", + example: "boolean(condition);", + description: W("less.builtin.boolean", '"store" a boolean test for later evaluation in a guard or if().') + }, + { + name: "length", + example: "length(@list);", + description: W("less.builtin.length", "returns the number of elements in a value list") + }, + { + name: "extract", + example: "extract(@list, index);", + description: W("less.builtin.extract", "returns a value at the specified position in the list") + }, + { + name: "range", + example: "range([start, ] end [, step]);", + description: W("less.builtin.range", "generate a list spanning a range of values") + }, + { + name: "each", + example: "each(@list, ruleset);", + description: W("less.builtin.each", "bind the evaluation of a ruleset to each member of a list.") + }, + { + name: "escape", + example: "escape(@string);", + description: W("less.builtin.escape", "URL encodes a string") + }, + { + name: "e", + example: "e(@string);", + description: W("less.builtin.e", "escape string content") + }, + { + name: "replace", + example: "replace(@string, @pattern, @replacement[, @flags]);", + description: W("less.builtin.replace", "string replace") + }, + { + name: "unit", + example: "unit(@dimension, [@unit: '']);", + description: W("less.builtin.unit", "remove or change the unit of a dimension") + }, + { + name: "color", + example: "color(@string);", + description: W("less.builtin.color", "parses a string to a color"), + type: "color" + }, + { + name: "convert", + example: "convert(@value, unit);", + description: W("less.builtin.convert", "converts numbers from one type into another") + }, + { + name: "data-uri", + example: "data-uri([mimetype,] url);", + description: W("less.builtin.data-uri", "inlines a resource and falls back to `url()`"), + type: "url" + }, + { + name: "abs", + description: W("less.builtin.abs", "absolute value of a number"), + example: "abs(number);" + }, + { + name: "acos", + description: W("less.builtin.acos", "arccosine - inverse of cosine function"), + example: "acos(number);" + }, + { + name: "asin", + description: W("less.builtin.asin", "arcsine - inverse of sine function"), + example: "asin(number);" + }, + { + name: "ceil", + example: "ceil(@number);", + description: W("less.builtin.ceil", "rounds up to an integer") + }, + { + name: "cos", + description: W("less.builtin.cos", "cosine function"), + example: "cos(number);" + }, + { + name: "floor", + description: W("less.builtin.floor", "rounds down to an integer"), + example: "floor(@number);" + }, + { + name: "percentage", + description: W("less.builtin.percentage", "converts to a %, e.g. 0.5 > 50%"), + example: "percentage(@number);", + type: "percentage" + }, + { + name: "round", + description: W("less.builtin.round", "rounds a number to a number of places"), + example: "round(number, [places: 0]);" + }, + { + name: "sqrt", + description: W("less.builtin.sqrt", "calculates square root of a number"), + example: "sqrt(number);" + }, + { + name: "sin", + description: W("less.builtin.sin", "sine function"), + example: "sin(number);" + }, + { + name: "tan", + description: W("less.builtin.tan", "tangent function"), + example: "tan(number);" + }, + { + name: "atan", + description: W("less.builtin.atan", "arctangent - inverse of tangent function"), + example: "atan(number);" + }, + { + name: "pi", + description: W("less.builtin.pi", "returns pi"), + example: "pi();" + }, + { + name: "pow", + description: W("less.builtin.pow", "first argument raised to the power of the second argument"), + example: "pow(@base, @exponent);" + }, + { + name: "mod", + description: W("less.builtin.mod", "first argument modulus second argument"), + example: "mod(number, number);" + }, + { + name: "min", + description: W("less.builtin.min", "returns the lowest of one or more values"), + example: "min(@x, @y);" + }, + { + name: "max", + description: W("less.builtin.max", "returns the lowest of one or more values"), + example: "max(@x, @y);" } - this.createFunctionProposals(functions, existingNode, true, result); - return _super.prototype.getTermProposals.call(this, entry, existingNode, result); - }; - LESSCompletion2.prototype.getColorProposals = function(entry, existingNode, result) { - this.createFunctionProposals(LESSCompletion2.colorProposals, existingNode, false, result); - return _super.prototype.getColorProposals.call(this, entry, existingNode, result); - }; - LESSCompletion2.prototype.getCompletionsForDeclarationProperty = function(declaration, result) { - this.getCompletionsForSelector(null, true, result); - return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result); - }; - LESSCompletion2.builtInProposals = [ + ], t.colorProposals = [ { - "name": "if", - "example": "if(condition, trueValue [, falseValue]);", - "description": localize12("less.builtin.if", "returns one of two values depending on a condition.") + name: "argb", + example: "argb(@color);", + description: W("less.builtin.argb", "creates a #AARRGGBB") }, { - "name": "boolean", - "example": "boolean(condition);", - "description": localize12("less.builtin.boolean", '"store" a boolean test for later evaluation in a guard or if().') + name: "hsl", + example: "hsl(@hue, @saturation, @lightness);", + description: W("less.builtin.hsl", "creates a color") }, { - "name": "length", - "example": "length(@list);", - "description": localize12("less.builtin.length", "returns the number of elements in a value list") + name: "hsla", + example: "hsla(@hue, @saturation, @lightness, @alpha);", + description: W("less.builtin.hsla", "creates a color") }, { - "name": "extract", - "example": "extract(@list, index);", - "description": localize12("less.builtin.extract", "returns a value at the specified position in the list") + name: "hsv", + example: "hsv(@hue, @saturation, @value);", + description: W("less.builtin.hsv", "creates a color") }, { - "name": "range", - "example": "range([start, ] end [, step]);", - "description": localize12("less.builtin.range", "generate a list spanning a range of values") + name: "hsva", + example: "hsva(@hue, @saturation, @value, @alpha);", + description: W("less.builtin.hsva", "creates a color") }, { - "name": "each", - "example": "each(@list, ruleset);", - "description": localize12("less.builtin.each", "bind the evaluation of a ruleset to each member of a list.") + name: "hue", + example: "hue(@color);", + description: W("less.builtin.hue", "returns the `hue` channel of `@color` in the HSL space") }, { - "name": "escape", - "example": "escape(@string);", - "description": localize12("less.builtin.escape", "URL encodes a string") + name: "saturation", + example: "saturation(@color);", + description: W("less.builtin.saturation", "returns the `saturation` channel of `@color` in the HSL space") }, { - "name": "e", - "example": "e(@string);", - "description": localize12("less.builtin.e", "escape string content") + name: "lightness", + example: "lightness(@color);", + description: W("less.builtin.lightness", "returns the `lightness` channel of `@color` in the HSL space") }, { - "name": "replace", - "example": "replace(@string, @pattern, @replacement[, @flags]);", - "description": localize12("less.builtin.replace", "string replace") + name: "hsvhue", + example: "hsvhue(@color);", + description: W("less.builtin.hsvhue", "returns the `hue` channel of `@color` in the HSV space") }, { - "name": "unit", - "example": "unit(@dimension, [@unit: '']);", - "description": localize12("less.builtin.unit", "remove or change the unit of a dimension") + name: "hsvsaturation", + example: "hsvsaturation(@color);", + description: W("less.builtin.hsvsaturation", "returns the `saturation` channel of `@color` in the HSV space") }, { - "name": "color", - "example": "color(@string);", - "description": localize12("less.builtin.color", "parses a string to a color"), - "type": "color" + name: "hsvvalue", + example: "hsvvalue(@color);", + description: W("less.builtin.hsvvalue", "returns the `value` channel of `@color` in the HSV space") }, { - "name": "convert", - "example": "convert(@value, unit);", - "description": localize12("less.builtin.convert", "converts numbers from one type into another") + name: "red", + example: "red(@color);", + description: W("less.builtin.red", "returns the `red` channel of `@color`") }, { - "name": "data-uri", - "example": "data-uri([mimetype,] url);", - "description": localize12("less.builtin.data-uri", "inlines a resource and falls back to `url()`"), - "type": "url" + name: "green", + example: "green(@color);", + description: W("less.builtin.green", "returns the `green` channel of `@color`") }, { - "name": "abs", - "description": localize12("less.builtin.abs", "absolute value of a number"), - "example": "abs(number);" + name: "blue", + example: "blue(@color);", + description: W("less.builtin.blue", "returns the `blue` channel of `@color`") }, { - "name": "acos", - "description": localize12("less.builtin.acos", "arccosine - inverse of cosine function"), - "example": "acos(number);" + name: "alpha", + example: "alpha(@color);", + description: W("less.builtin.alpha", "returns the `alpha` channel of `@color`") }, { - "name": "asin", - "description": localize12("less.builtin.asin", "arcsine - inverse of sine function"), - "example": "asin(number);" + name: "luma", + example: "luma(@color);", + description: W("less.builtin.luma", "returns the `luma` value (perceptual brightness) of `@color`") }, { - "name": "ceil", - "example": "ceil(@number);", - "description": localize12("less.builtin.ceil", "rounds up to an integer") + name: "saturate", + example: "saturate(@color, 10%);", + description: W("less.builtin.saturate", "return `@color` 10% points more saturated") }, { - "name": "cos", - "description": localize12("less.builtin.cos", "cosine function"), - "example": "cos(number);" + name: "desaturate", + example: "desaturate(@color, 10%);", + description: W("less.builtin.desaturate", "return `@color` 10% points less saturated") }, { - "name": "floor", - "description": localize12("less.builtin.floor", "rounds down to an integer"), - "example": "floor(@number);" + name: "lighten", + example: "lighten(@color, 10%);", + description: W("less.builtin.lighten", "return `@color` 10% points lighter") }, { - "name": "percentage", - "description": localize12("less.builtin.percentage", "converts to a %, e.g. 0.5 > 50%"), - "example": "percentage(@number);", - "type": "percentage" + name: "darken", + example: "darken(@color, 10%);", + description: W("less.builtin.darken", "return `@color` 10% points darker") }, { - "name": "round", - "description": localize12("less.builtin.round", "rounds a number to a number of places"), - "example": "round(number, [places: 0]);" + name: "fadein", + example: "fadein(@color, 10%);", + description: W("less.builtin.fadein", "return `@color` 10% points less transparent") }, { - "name": "sqrt", - "description": localize12("less.builtin.sqrt", "calculates square root of a number"), - "example": "sqrt(number);" + name: "fadeout", + example: "fadeout(@color, 10%);", + description: W("less.builtin.fadeout", "return `@color` 10% points more transparent") }, { - "name": "sin", - "description": localize12("less.builtin.sin", "sine function"), - "example": "sin(number);" + name: "fade", + example: "fade(@color, 50%);", + description: W("less.builtin.fade", "return `@color` with 50% transparency") }, { - "name": "tan", - "description": localize12("less.builtin.tan", "tangent function"), - "example": "tan(number);" + name: "spin", + example: "spin(@color, 10);", + description: W("less.builtin.spin", "return `@color` with a 10 degree larger in hue") }, { - "name": "atan", - "description": localize12("less.builtin.atan", "arctangent - inverse of tangent function"), - "example": "atan(number);" + name: "mix", + example: "mix(@color1, @color2, [@weight: 50%]);", + description: W("less.builtin.mix", "return a mix of `@color1` and `@color2`") }, { - "name": "pi", - "description": localize12("less.builtin.pi", "returns pi"), - "example": "pi();" + name: "greyscale", + example: "greyscale(@color);", + description: W("less.builtin.greyscale", "returns a grey, 100% desaturated color") }, { - "name": "pow", - "description": localize12("less.builtin.pow", "first argument raised to the power of the second argument"), - "example": "pow(@base, @exponent);" + name: "contrast", + example: "contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);", + description: W("less.builtin.contrast", "return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes") }, { - "name": "mod", - "description": localize12("less.builtin.mod", "first argument modulus second argument"), - "example": "mod(number, number);" + name: "multiply", + example: "multiply(@color1, @color2);" }, { - "name": "min", - "description": localize12("less.builtin.min", "returns the lowest of one or more values"), - "example": "min(@x, @y);" + name: "screen", + example: "screen(@color1, @color2);" }, { - "name": "max", - "description": localize12("less.builtin.max", "returns the lowest of one or more values"), - "example": "max(@x, @y);" + 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);" } - ]; - LESSCompletion2.colorProposals = [ - { - "name": "argb", - "example": "argb(@color);", - "description": localize12("less.builtin.argb", "creates a #AARRGGBB") - }, - { - "name": "hsl", - "example": "hsl(@hue, @saturation, @lightness);", - "description": localize12("less.builtin.hsl", "creates a color") - }, - { - "name": "hsla", - "example": "hsla(@hue, @saturation, @lightness, @alpha);", - "description": localize12("less.builtin.hsla", "creates a color") - }, - { - "name": "hsv", - "example": "hsv(@hue, @saturation, @value);", - "description": localize12("less.builtin.hsv", "creates a color") - }, - { - "name": "hsva", - "example": "hsva(@hue, @saturation, @value, @alpha);", - "description": localize12("less.builtin.hsva", "creates a color") - }, - { - "name": "hue", - "example": "hue(@color);", - "description": localize12("less.builtin.hue", "returns the `hue` channel of `@color` in the HSL space") - }, - { - "name": "saturation", - "example": "saturation(@color);", - "description": localize12("less.builtin.saturation", "returns the `saturation` channel of `@color` in the HSL space") - }, - { - "name": "lightness", - "example": "lightness(@color);", - "description": localize12("less.builtin.lightness", "returns the `lightness` channel of `@color` in the HSL space") - }, - { - "name": "hsvhue", - "example": "hsvhue(@color);", - "description": localize12("less.builtin.hsvhue", "returns the `hue` channel of `@color` in the HSV space") - }, - { - "name": "hsvsaturation", - "example": "hsvsaturation(@color);", - "description": localize12("less.builtin.hsvsaturation", "returns the `saturation` channel of `@color` in the HSV space") - }, - { - "name": "hsvvalue", - "example": "hsvvalue(@color);", - "description": localize12("less.builtin.hsvvalue", "returns the `value` channel of `@color` in the HSV space") - }, - { - "name": "red", - "example": "red(@color);", - "description": localize12("less.builtin.red", "returns the `red` channel of `@color`") - }, - { - "name": "green", - "example": "green(@color);", - "description": localize12("less.builtin.green", "returns the `green` channel of `@color`") - }, - { - "name": "blue", - "example": "blue(@color);", - "description": localize12("less.builtin.blue", "returns the `blue` channel of `@color`") - }, - { - "name": "alpha", - "example": "alpha(@color);", - "description": localize12("less.builtin.alpha", "returns the `alpha` channel of `@color`") - }, - { - "name": "luma", - "example": "luma(@color);", - "description": localize12("less.builtin.luma", "returns the `luma` value (perceptual brightness) of `@color`") - }, - { - "name": "saturate", - "example": "saturate(@color, 10%);", - "description": localize12("less.builtin.saturate", "return `@color` 10% points more saturated") - }, - { - "name": "desaturate", - "example": "desaturate(@color, 10%);", - "description": localize12("less.builtin.desaturate", "return `@color` 10% points less saturated") - }, - { - "name": "lighten", - "example": "lighten(@color, 10%);", - "description": localize12("less.builtin.lighten", "return `@color` 10% points lighter") - }, - { - "name": "darken", - "example": "darken(@color, 10%);", - "description": localize12("less.builtin.darken", "return `@color` 10% points darker") - }, - { - "name": "fadein", - "example": "fadein(@color, 10%);", - "description": localize12("less.builtin.fadein", "return `@color` 10% points less transparent") - }, - { - "name": "fadeout", - "example": "fadeout(@color, 10%);", - "description": localize12("less.builtin.fadeout", "return `@color` 10% points more transparent") - }, - { - "name": "fade", - "example": "fade(@color, 50%);", - "description": localize12("less.builtin.fade", "return `@color` with 50% transparency") - }, - { - "name": "spin", - "example": "spin(@color, 10);", - "description": localize12("less.builtin.spin", "return `@color` with a 10 degree larger in hue") - }, - { - "name": "mix", - "example": "mix(@color1, @color2, [@weight: 50%]);", - "description": localize12("less.builtin.mix", "return a mix of `@color1` and `@color2`") - }, - { - "name": "greyscale", - "example": "greyscale(@color);", - "description": localize12("less.builtin.greyscale", "returns a grey, 100% desaturated color") - }, - { - "name": "contrast", - "example": "contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);", - "description": localize12("less.builtin.contrast", "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);" - } - ]; - return LESSCompletion2; -}(CSSCompletion); -function getFoldingRanges(document, context) { - var ranges = computeFoldingRanges(document); - return limitFoldingRanges(ranges, context); + ], t; +}(di); +function Ld(e, t) { + var n = Td(e); + return Wd(n, t); } -function computeFoldingRanges(document) { - function getStartLine(t) { - return document.positionAt(t.offset).line; +function Td(e) { + function t(p) { + return e.positionAt(p.offset).line; } - function getEndLine(t) { - return document.positionAt(t.offset + t.len).line; + function n(p) { + return e.positionAt(p.offset + p.len).line; } - function getScanner() { - switch (document.languageId) { + function r() { + switch (e.languageId) { case "scss": - return new SCSSScanner(); + return new zo(); case "less": - return new LESSScanner(); + return new Mo(); default: - return new Scanner(); + return new en(); } } - function tokenToRange(t, kind) { - var startLine = getStartLine(t); - var endLine = getEndLine(t); - if (startLine !== endLine) { - return { - startLine, - endLine, - kind - }; - } else { - return null; - } + function i(p, f) { + var g = t(p), w = n(p); + return g !== w ? { + startLine: g, + endLine: w, + kind: f + } : null; } - var ranges = []; - var delimiterStack = []; - var scanner = getScanner(); - scanner.ignoreComment = false; - scanner.setSource(document.getText()); - var token = scanner.scan(); - var prevToken = null; - var _loop_1 = function() { - switch (token.type) { - case TokenType.CurlyL: - case InterpolationFunction: { - delimiterStack.push({ line: getStartLine(token), type: "brace", isStart: true }); + var a = [], o = [], l = r(); + l.ignoreComment = !1, l.setSource(e.getText()); + for (var h = l.scan(), c = null, d = function() { + switch (h.type) { + case u.CurlyL: + case Ln: { + o.push({ line: t(h), type: "brace", isStart: !0 }); break; } - case TokenType.CurlyR: { - if (delimiterStack.length !== 0) { - var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, "brace"); - if (!prevDelimiter) { + case u.CurlyR: { + if (o.length !== 0) { + var p = Bs(o, "brace"); + if (!p) break; - } - var endLine = getEndLine(token); - if (prevDelimiter.type === "brace") { - if (prevToken && getEndLine(prevToken) !== endLine) { - endLine--; - } - if (prevDelimiter.line !== endLine) { - ranges.push({ - startLine: prevDelimiter.line, - endLine, - kind: void 0 - }); - } - } + var f = n(h); + p.type === "brace" && (c && n(c) !== f && f--, p.line !== f && a.push({ + startLine: p.line, + endLine: f, + kind: void 0 + })); } break; } - case TokenType.Comment: { - var commentRegionMarkerToDelimiter_1 = function(marker) { - if (marker === "#region") { - return { line: getStartLine(token), type: "comment", isStart: true }; - } else { - return { line: getEndLine(token), type: "comment", isStart: false }; - } - }; - var getCurrDelimiter = function(token2) { - var matches2 = token2.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//); - if (matches2) { - return commentRegionMarkerToDelimiter_1(matches2[1]); - } else if (document.languageId === "scss" || document.languageId === "less") { - var matches_1 = token2.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/); - if (matches_1) { - return commentRegionMarkerToDelimiter_1(matches_1[1]); - } + case u.Comment: { + var g = function(A) { + return A === "#region" ? { line: t(h), type: "comment", isStart: !0 } : { line: n(h), type: "comment", isStart: !1 }; + }, w = function(A) { + var C = A.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//); + if (C) + return g(C[1]); + if (e.languageId === "scss" || e.languageId === "less") { + var R = A.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/); + if (R) + return g(R[1]); } return null; - }; - var currDelimiter = getCurrDelimiter(token); - if (currDelimiter) { - if (currDelimiter.isStart) { - delimiterStack.push(currDelimiter); - } else { - var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, "comment"); - if (!prevDelimiter) { + }, b = w(h); + if (b) + if (b.isStart) + o.push(b); + else { + var p = Bs(o, "comment"); + if (!p) break; - } - if (prevDelimiter.type === "comment") { - if (prevDelimiter.line !== currDelimiter.line) { - ranges.push({ - startLine: prevDelimiter.line, - endLine: currDelimiter.line, - kind: "region" - }); - } - } - } - } else { - var range = tokenToRange(token, "comment"); - if (range) { - ranges.push(range); + p.type === "comment" && p.line !== b.line && a.push({ + startLine: p.line, + endLine: b.line, + kind: "region" + }); } + else { + var y = i(h, "comment"); + y && a.push(y); } break; } } - prevToken = token; - token = scanner.scan(); - }; - while (token.type !== TokenType.EOF) { - _loop_1(); - } - return ranges; + c = h, h = l.scan(); + }; h.type !== u.EOF; ) + d(); + return a; } -function popPrevStartDelimiterOfType(stack, type) { - if (stack.length === 0) { +function Bs(e, t) { + if (e.length === 0) return null; - } - for (var i = stack.length - 1; i >= 0; i--) { - if (stack[i].type === type && stack[i].isStart) { - return stack.splice(i, 1)[0]; - } - } + for (var n = e.length - 1; n >= 0; n--) + if (e[n].type === t && e[n].isStart) + return e.splice(n, 1)[0]; return null; } -function limitFoldingRanges(ranges, context) { - var maxRanges = context && context.rangeLimit || Number.MAX_VALUE; - var sortedRanges = ranges.sort(function(r1, r2) { - var diff = r1.startLine - r2.startLine; - if (diff === 0) { - diff = r1.endLine - r2.endLine; - } - return diff; - }); - var validRanges = []; - var prevEndLine = -1; - sortedRanges.forEach(function(r) { - if (!(r.startLine < prevEndLine && prevEndLine < r.endLine)) { - validRanges.push(r); - prevEndLine = r.endLine; - } - }); - if (validRanges.length < maxRanges) { - return validRanges; - } else { - return validRanges.slice(0, maxRanges); - } +function Wd(e, t) { + var n = t && t.rangeLimit || Number.MAX_VALUE, r = e.sort(function(o, l) { + var h = o.startLine - l.startLine; + return h === 0 && (h = o.endLine - l.endLine), h; + }), i = [], a = -1; + return r.forEach(function(o) { + o.startLine < a && a < o.endLine || (i.push(o), a = o.endLine); + }), i.length < n ? i : i.slice(0, n); } -var cssData = { - "version": 1.1, - "properties": [ +var Od = { + version: 1.1, + properties: [ { - "name": "additive-symbols", - "browsers": [ + name: "additive-symbols", + browsers: [ "FF33" ], - "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": [ + 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", @@ -20467,337 +13270,337 @@ var cssData = { ] }, { - "name": "align-content", - "values": [ + name: "align-content", + values: [ { - "name": "center", - "description": "Lines are packed toward the center of the flex container." + 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-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: "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-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: "space-between", + description: "Lines are evenly distributed in the flex container." }, { - "name": "stretch", - "description": "Lines stretch to take up the remaining space." + name: "stretch", + description: "Lines stretch to take up the remaining space." } ], - "syntax": "normal | | | ? ", - "relevance": 62, - "description": "Aligns a flex container\u2019s 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": [ + syntax: "normal | | | ? ", + relevance: 62, + description: "Aligns a flex container\u2019s 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", - "values": [ + name: "align-items", + values: [ { - "name": "baseline", - "description": "If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment." + name: "baseline", + description: "If the flex item\u2019s 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\u2019s margin box is centered in the cross axis within the line." + name: "center", + description: "The flex item\u2019s 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-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: "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: "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." } ], - "syntax": "normal | stretch | | [ ? ]", - "relevance": 86, - "description": "Aligns flex items along the cross axis of the current line of the flex container.", - "restrictions": [ + syntax: "normal | stretch | | [ ? ]", + relevance: 86, + description: "Aligns flex items along the cross axis of the current line of the flex container.", + restrictions: [ "enum" ] }, { - "name": "justify-items", - "values": [ + name: "justify-items", + values: [ { - "name": "auto" + name: "auto" }, { - "name": "normal" + name: "normal" }, { - "name": "end" + name: "end" }, { - "name": "start" + name: "start" }, { - "name": "flex-end", - "description": '"Flex items are packed toward the end of the line."' + 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: "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-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: "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: "center", + description: "The items are packed flush to each other toward the center of the of the alignment container." }, { - "name": "left" + name: "left" }, { - "name": "right" + name: "right" }, { - "name": "baseline" + name: "baseline" }, { - "name": "first baseline" + name: "first baseline" }, { - "name": "last 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: "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: "save" }, { - "name": "unsave" + name: "unsave" }, { - "name": "legacy" + name: "legacy" } ], - "syntax": "normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]", - "relevance": 53, - "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": [ + syntax: "normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]", + relevance: 53, + 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", - "values": [ + name: "justify-self", + values: [ { - "name": "auto" + name: "auto" }, { - "name": "normal" + name: "normal" }, { - "name": "end" + name: "end" }, { - "name": "start" + name: "start" }, { - "name": "flex-end", - "description": '"Flex items are packed toward the end of the line."' + 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: "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-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: "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: "center", + description: "The items are packed flush to each other toward the center of the of the alignment container." }, { - "name": "left" + name: "left" }, { - "name": "right" + name: "right" }, { - "name": "baseline" + name: "baseline" }, { - "name": "first baseline" + name: "first baseline" }, { - "name": "last 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: "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: "save" }, { - "name": "unsave" + name: "unsave" } ], - "syntax": "auto | normal | stretch | | ? [ | left | right ]", - "relevance": 53, - "description": "Defines the way of justifying a box inside its container along the appropriate axis.", - "restrictions": [ + syntax: "auto | normal | stretch | | ? [ | left | right ]", + relevance: 53, + description: "Defines the way of justifying a box inside its container along the appropriate axis.", + restrictions: [ "enum" ] }, { - "name": "align-self", - "values": [ + name: "align-self", + values: [ { - "name": "auto", - "description": "Computes to the value of 'align-items' on the element\u2019s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself." + name: "auto", + description: "Computes to the value of 'align-items' on the element\u2019s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself." }, { - "name": "baseline", - "description": "If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment." + name: "baseline", + description: "If the flex item\u2019s 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\u2019s margin box is centered in the cross axis within the line." + name: "center", + description: "The flex item\u2019s 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-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: "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: "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." } ], - "syntax": "auto | normal | stretch | | ? ", - "relevance": 72, - "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.", - "restrictions": [ + syntax: "auto | normal | stretch | | ? ", + relevance: 72, + description: "Allows the default alignment along the cross axis to be overridden for individual flex items.", + restrictions: [ "enum" ] }, { - "name": "all", - "browsers": [ + name: "all", + browsers: [ "E79", "FF27", "S9.1", "C37", "O24" ], - "values": [], - "syntax": "initial | inherit | unset | revert", - "relevance": 52, - "references": [ + values: [], + syntax: "initial | inherit | unset | revert", + relevance: 52, + references: [ { - "name": "MDN Reference", - "url": "https://developer.mozilla.org/docs/Web/CSS/all" + name: "MDN Reference", + url: "https://developer.mozilla.org/docs/Web/CSS/all" } ], - "description": "Shorthand that resets all properties except 'direction' and 'unicode-bidi'.", - "restrictions": [ + description: "Shorthand that resets all properties except 'direction' and 'unicode-bidi'.", + restrictions: [ "enum" ] }, { - "name": "alt", - "browsers": [ + name: "alt", + browsers: [ "S9" ], - "values": [], - "relevance": 50, - "references": [ + values: [], + relevance: 50, + references: [ { - "name": "MDN Reference", - "url": "https://developer.mozilla.org/docs/Web/CSS/alt" + 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": [ + description: "Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.", + restrictions: [ "string", "enum" ] }, { - "name": "animation", - "values": [ + name: "animation", + 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", + 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: "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: "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: "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: "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: "infinite", + description: "Causes the animation to repeat forever." }, { - "name": "none", - "description": "No animation is performed" + name: "none", + description: "No animation is performed" }, { - "name": "normal", - "description": "Normal playback." + 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." + name: "reverse", + description: "All iterations of the animation are played in the reverse direction from the way they were specified." } ], - "syntax": "#", - "relevance": 82, - "references": [ + syntax: "#", + relevance: 82, + references: [ { - "name": "MDN Reference", - "url": "https://developer.mozilla.org/docs/Web/CSS/animation" + 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": [ + description: "Shorthand property combines six of the animation properties into a single property.", + restrictions: [ "time", "timing-function", "enum", @@ -20806,240 +13609,240 @@ var cssData = { ] }, { - "name": "animation-delay", - "syntax": "