Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-html / lib / index.js
index 90dec9131d3a7c0e56324900f46e2a6a3e301a25..0cd720a4c531260736a151fabe52d4d0bed0686d 100644 (file)
-(function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
-/******/       // The module cache
-/******/       var installedModules = {};
-/******/
-/******/       // The require function
-/******/       function __webpack_require__(moduleId) {
-/******/
-/******/               // Check if module is in cache
-/******/               if(installedModules[moduleId]) {
-/******/                       return installedModules[moduleId].exports;
-/******/               }
-/******/               // Create a new module (and put it into the cache)
-/******/               var module = installedModules[moduleId] = {
-/******/                       i: moduleId,
-/******/                       l: false,
-/******/                       exports: {}
-/******/               };
-/******/
-/******/               // Execute the module function
-/******/               modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/               // Flag the module as loaded
-/******/               module.l = true;
-/******/
-/******/               // Return the exports of the module
-/******/               return module.exports;
-/******/       }
-/******/
-/******/
-/******/       // expose the modules object (__webpack_modules__)
-/******/       __webpack_require__.m = modules;
-/******/
-/******/       // expose the module cache
-/******/       __webpack_require__.c = installedModules;
-/******/
-/******/       // define getter function for harmony exports
-/******/       __webpack_require__.d = function(exports, name, getter) {
-/******/               if(!__webpack_require__.o(exports, name)) {
-/******/                       Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/               }
-/******/       };
-/******/
-/******/       // define __esModule on exports
-/******/       __webpack_require__.r = function(exports) {
-/******/               if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/                       Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/               }
-/******/               Object.defineProperty(exports, '__esModule', { value: true });
-/******/       };
-/******/
-/******/       // create a fake namespace object
-/******/       // mode & 1: value is a module id, require it
-/******/       // mode & 2: merge all properties of value into the ns
-/******/       // mode & 4: return value when already ns object
-/******/       // mode & 8|1: behave like require
-/******/       __webpack_require__.t = function(value, mode) {
-/******/               if(mode & 1) value = __webpack_require__(value);
-/******/               if(mode & 8) return value;
-/******/               if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/               var ns = Object.create(null);
-/******/               __webpack_require__.r(ns);
-/******/               Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/               if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/               return ns;
-/******/       };
-/******/
-/******/       // getDefaultExport function for compatibility with non-harmony modules
-/******/       __webpack_require__.n = function(module) {
-/******/               var getter = module && module.__esModule ?
-/******/                       function getDefault() { return module['default']; } :
-/******/                       function getModuleExports() { return module; };
-/******/               __webpack_require__.d(getter, 'a', getter);
-/******/               return getter;
-/******/       };
-/******/
-/******/       // Object.prototype.hasOwnProperty.call
-/******/       __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/       // __webpack_public_path__
-/******/       __webpack_require__.p = "";
-/******/
-/******/
-/******/       // Load entry module and return exports
-/******/       return __webpack_require__(__webpack_require__.s = 0);
-/******/ })
-/************************************************************************/
-/******/ ([
+(function(e, a) { for(var i in a) e[i] = a[i]; if(a.__esModule) Object.defineProperty(e, "__esModule", { value: true }); }(exports,
+/******/ (() => { // webpackBootstrap
+/******/       "use strict";
+/******/       var __webpack_modules__ = ([
 /* 0 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
 
-"use strict";
 
 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
     return new (P || (P = Promise))(function (resolve, reject) {
         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
         function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
-        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
     });
 };
-Object.defineProperty(exports, "__esModule", { value: true });
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.activate = void 0;
 const coc_nvim_1 = __webpack_require__(1);
 const customData_1 = __webpack_require__(2);
 const vscode_languageserver_protocol_1 = __webpack_require__(4);
-const tagClosing_1 = __webpack_require__(31);
+const tagClosing_1 = __webpack_require__(41);
 var TagCloseRequest;
 (function (TagCloseRequest) {
     TagCloseRequest.type = new vscode_languageserver_protocol_1.RequestType('html/tag');
@@ -115,7 +33,7 @@ function activate(context) {
         if (enable === false)
             return;
         const file = context.asAbsolutePath('lib/server.js');
-        const selector = config.filetypes || ['html', 'handlebars', 'htmldjango'];
+        const selector = config.filetypes || ['html', 'handlebars', 'htmldjango', 'blade'];
         const embeddedLanguages = { css: true, javascript: true };
         let serverOptions = {
             module: file,
@@ -174,28 +92,40 @@ exports.activate = activate;
 
 /***/ }),
 /* 1 */
-/***/ (function(module, exports) {
+/***/ ((module) => {
 
-module.exports = require("coc.nvim");
+module.exports = require("coc.nvim");;
 
 /***/ }),
 /* 2 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
 
-"use strict";
 
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
-    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
-    result["default"] = mod;
+    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+    __setModuleDefault(result, mod);
     return result;
 };
-Object.defineProperty(exports, "__esModule", { value: true });
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.getCustomDataPathsFromAllExtensions = exports.getCustomDataPathsInAllWorkspaces = void 0;
 const path = __importStar(__webpack_require__(3));
 const coc_nvim_1 = __webpack_require__(1);
 function getCustomDataPathsInAllWorkspaces() {
@@ -204,2494 +134,3006 @@ function getCustomDataPathsInAllWorkspaces() {
     if (!workspaceFolders) {
         return dataPaths;
     }
-    workspaceFolders.forEach(wf => {
-        const allHtmlConfig = coc_nvim_1.workspace.getConfiguration(undefined, wf.uri);
-        const wfHtmlConfig = allHtmlConfig.inspect('html');
-        if (wfHtmlConfig &&
-            wfHtmlConfig.workspaceFolderValue &&
-            wfHtmlConfig.workspaceFolderValue.experimental &&
-            wfHtmlConfig.workspaceFolderValue.experimental.customData) {
-            const customData = wfHtmlConfig.workspaceFolderValue.experimental.customData;
-            if (Array.isArray(customData)) {
-                customData.forEach(t => {
-                    if (typeof t === 'string') {
-                        dataPaths.push(path.resolve(coc_nvim_1.Uri.parse(wf.uri).fsPath, t));
-                    }
-                });
+    workspaceFolders.forEach(wf => {
+        const allHtmlConfig = coc_nvim_1.workspace.getConfiguration(undefined, wf.uri);
+        const wfHtmlConfig = allHtmlConfig.inspect('html');
+        if (wfHtmlConfig &&
+            wfHtmlConfig.workspaceFolderValue &&
+            wfHtmlConfig.workspaceFolderValue.experimental &&
+            wfHtmlConfig.workspaceFolderValue.experimental.customData) {
+            const customData = wfHtmlConfig.workspaceFolderValue.experimental.customData;
+            if (Array.isArray(customData)) {
+                customData.forEach(t => {
+                    if (typeof t === 'string') {
+                        dataPaths.push(path.resolve(coc_nvim_1.Uri.parse(wf.uri).fsPath, t));
+                    }
+                });
+            }
+        }
+    });
+    return dataPaths;
+}
+exports.getCustomDataPathsInAllWorkspaces = getCustomDataPathsInAllWorkspaces;
+function getCustomDataPathsFromAllExtensions() {
+    const dataPaths = [];
+    for (const extension of coc_nvim_1.extensions.all) {
+        const contributes = extension.packageJSON && extension.packageJSON.contributes;
+        if (contributes &&
+            contributes.html &&
+            contributes.html.experimental.customData &&
+            Array.isArray(contributes.html.experimental.customData)) {
+            const relativePaths = contributes.html.experimental.customData;
+            relativePaths.forEach(rp => {
+                dataPaths.push(path.resolve(extension.extensionPath, rp));
+            });
+        }
+    }
+    return dataPaths;
+}
+exports.getCustomDataPathsFromAllExtensions = getCustomDataPathsFromAllExtensions;
+
+
+/***/ }),
+/* 3 */
+/***/ ((module) => {
+
+module.exports = require("path");;
+
+/***/ }),
+/* 4 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const node_1 = __webpack_require__(5);
+__export(__webpack_require__(5));
+__export(__webpack_require__(24));
+function createProtocolConnection(input, output, logger, options) {
+    return node_1.createMessageConnection(input, output, logger, options);
+}
+exports.createProtocolConnection = createProtocolConnection;
+//# sourceMappingURL=main.js.map
+
+/***/ }),
+/* 5 */
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ----------------------------------------------------------------------------------------- */
+
+
+module.exports = __webpack_require__(6);
+
+/***/ }),
+/* 6 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ----------------------------------------------------------------------------------------- */
+const ril_1 = __webpack_require__(7);
+// Install the node runtime abstract.
+ril_1.default.install();
+const api_1 = __webpack_require__(11);
+const path = __webpack_require__(3);
+const os = __webpack_require__(21);
+const crypto_1 = __webpack_require__(22);
+const net_1 = __webpack_require__(23);
+__export(__webpack_require__(11));
+class IPCMessageReader extends api_1.AbstractMessageReader {
+    constructor(process) {
+        super();
+        this.process = process;
+        let eventEmitter = this.process;
+        eventEmitter.on('error', (error) => this.fireError(error));
+        eventEmitter.on('close', () => this.fireClose());
+    }
+    listen(callback) {
+        this.process.on('message', callback);
+        return api_1.Disposable.create(() => this.process.off('message', callback));
+    }
+}
+exports.IPCMessageReader = IPCMessageReader;
+class IPCMessageWriter extends api_1.AbstractMessageWriter {
+    constructor(process) {
+        super();
+        this.process = process;
+        this.errorCount = 0;
+        let eventEmitter = this.process;
+        eventEmitter.on('error', (error) => this.fireError(error));
+        eventEmitter.on('close', () => this.fireClose);
+    }
+    write(msg) {
+        try {
+            if (typeof this.process.send === 'function') {
+                this.process.send(msg, undefined, undefined, (error) => {
+                    if (error) {
+                        this.errorCount++;
+                        this.handleError(error, msg);
+                    }
+                    else {
+                        this.errorCount = 0;
+                    }
+                });
+            }
+            return Promise.resolve();
+        }
+        catch (error) {
+            this.handleError(error, msg);
+            return Promise.reject(error);
+        }
+    }
+    handleError(error, msg) {
+        this.errorCount++;
+        this.fireError(error, msg, this.errorCount);
+    }
+}
+exports.IPCMessageWriter = IPCMessageWriter;
+class SocketMessageReader extends api_1.ReadableStreamMessageReader {
+    constructor(socket, encoding = 'utf-8') {
+        super(ril_1.default().stream.asReadableStream(socket), encoding);
+    }
+}
+exports.SocketMessageReader = SocketMessageReader;
+class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
+    constructor(socket, options) {
+        super(ril_1.default().stream.asWritableStream(socket), options);
+        this.socket = socket;
+    }
+    dispose() {
+        super.dispose();
+        this.socket.destroy();
+    }
+}
+exports.SocketMessageWriter = SocketMessageWriter;
+class StreamMessageReader extends api_1.ReadableStreamMessageReader {
+    constructor(readble, encoding) {
+        super(ril_1.default().stream.asReadableStream(readble), encoding);
+    }
+}
+exports.StreamMessageReader = StreamMessageReader;
+class StreamMessageWriter extends api_1.WriteableStreamMessageWriter {
+    constructor(writable, options) {
+        super(ril_1.default().stream.asWritableStream(writable), options);
+    }
+}
+exports.StreamMessageWriter = StreamMessageWriter;
+function generateRandomPipeName() {
+    const randomSuffix = crypto_1.randomBytes(21).toString('hex');
+    if (process.platform === 'win32') {
+        return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
+    }
+    else {
+        // Mac/Unix: use socket file
+        return path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
+    }
+}
+exports.generateRandomPipeName = generateRandomPipeName;
+function createClientPipeTransport(pipeName, encoding = 'utf-8') {
+    let connectResolve;
+    const connected = new Promise((resolve, _reject) => {
+        connectResolve = resolve;
+    });
+    return new Promise((resolve, reject) => {
+        let server = net_1.createServer((socket) => {
+            server.close();
+            connectResolve([
+                new SocketMessageReader(socket, encoding),
+                new SocketMessageWriter(socket, encoding)
+            ]);
+        });
+        server.on('error', reject);
+        server.listen(pipeName, () => {
+            server.removeListener('error', reject);
+            resolve({
+                onConnected: () => { return connected; }
+            });
+        });
+    });
+}
+exports.createClientPipeTransport = createClientPipeTransport;
+function createServerPipeTransport(pipeName, encoding = 'utf-8') {
+    const socket = net_1.createConnection(pipeName);
+    return [
+        new SocketMessageReader(socket, encoding),
+        new SocketMessageWriter(socket, encoding)
+    ];
+}
+exports.createServerPipeTransport = createServerPipeTransport;
+function createClientSocketTransport(port, encoding = 'utf-8') {
+    let connectResolve;
+    const connected = new Promise((resolve, _reject) => {
+        connectResolve = resolve;
+    });
+    return new Promise((resolve, reject) => {
+        const server = net_1.createServer((socket) => {
+            server.close();
+            connectResolve([
+                new SocketMessageReader(socket, encoding),
+                new SocketMessageWriter(socket, encoding)
+            ]);
+        });
+        server.on('error', reject);
+        server.listen(port, '127.0.0.1', () => {
+            server.removeListener('error', reject);
+            resolve({
+                onConnected: () => { return connected; }
+            });
+        });
+    });
+}
+exports.createClientSocketTransport = createClientSocketTransport;
+function createServerSocketTransport(port, encoding = 'utf-8') {
+    const socket = net_1.createConnection(port, '127.0.0.1');
+    return [
+        new SocketMessageReader(socket, encoding),
+        new SocketMessageWriter(socket, encoding)
+    ];
+}
+exports.createServerSocketTransport = createServerSocketTransport;
+function isMessageReader(value) {
+    return value.listen !== undefined && value.read === undefined;
+}
+function isMessageWriter(value) {
+    return value.write !== undefined && value.end === undefined;
+}
+function createMessageConnection(input, output, logger, options) {
+    if (!logger) {
+        logger = api_1.NullLogger;
+    }
+    const reader = isMessageReader(input) ? input : new StreamMessageReader(input);
+    const writer = isMessageWriter(output) ? output : new StreamMessageWriter(output);
+    if (api_1.ConnectionStrategy.is(options)) {
+        options = { connectionStrategy: options };
+    }
+    return api_1.createMessageConnection(reader, writer, logger, options);
+}
+exports.createMessageConnection = createMessageConnection;
+//# sourceMappingURL=main.js.map
+
+/***/ }),
+/* 7 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const ral_1 = __webpack_require__(8);
+const disposable_1 = __webpack_require__(9);
+const util_1 = __webpack_require__(10);
+const DefaultSize = 8192;
+const CR = Buffer.from('\r', 'ascii')[0];
+const LF = Buffer.from('\n', 'ascii')[0];
+const CRLF = '\r\n';
+class MessageBuffer {
+    constructor(encoding = 'utf-8') {
+        this._encoding = encoding;
+        this.index = 0;
+        this.buffer = Buffer.allocUnsafe(DefaultSize);
+    }
+    get encoding() {
+        return this._encoding;
+    }
+    append(chunk) {
+        let toAppend;
+        if (typeof chunk === 'string') {
+            toAppend = Buffer.from(chunk, this._encoding);
+        }
+        else {
+            toAppend = chunk;
+        }
+        if (this.buffer.length - this.index >= toAppend.length) {
+            this.buffer.set(toAppend, this.index);
+        }
+        else {
+            var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
+            if (this.index === 0) {
+                this.buffer = Buffer.allocUnsafe(newSize);
+                this.buffer.set(toAppend);
+            }
+            else {
+                this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
+            }
+        }
+        this.index += toAppend.length;
+    }
+    tryReadHeaders() {
+        let current = 0;
+        while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
+            current++;
+        }
+        // No header / body separator found (e.g CRLFCRLF)
+        if (current + 3 >= this.index) {
+            return undefined;
+        }
+        const result = new Map();
+        const headers = this.buffer.toString('ascii', 0, current).split(CRLF);
+        headers.forEach((header) => {
+            let index = header.indexOf(':');
+            if (index === -1) {
+                throw new Error('Message header must separate key and value using :');
+            }
+            let key = header.substr(0, index);
+            let value = header.substr(index + 1).trim();
+            result.set(key, value);
+        });
+        let nextStart = current + 4;
+        this.buffer = this.buffer.slice(nextStart);
+        this.index = this.index - nextStart;
+        return result;
+    }
+    tryReadBody(length) {
+        if (this.index < length) {
+            return undefined;
+        }
+        const result = Buffer.alloc(length);
+        this.buffer.copy(result, 0, 0, length);
+        const nextStart = length;
+        this.buffer.copy(this.buffer, 0, nextStart);
+        this.index = this.index - nextStart;
+        return result;
+    }
+    get numberOfBytes() {
+        return this.index;
+    }
+}
+class ReadableStreamWrapper {
+    constructor(stream) {
+        this.stream = stream;
+    }
+    onClose(listener) {
+        this.stream.on('close', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('close', listener));
+    }
+    onError(listener) {
+        this.stream.on('error', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('error', listener));
+    }
+    onEnd(listener) {
+        this.stream.on('end', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('end', listener));
+    }
+    onData(listener) {
+        this.stream.on('data', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('data', listener));
+    }
+}
+class WritableStreamWrapper {
+    constructor(stream) {
+        this.stream = stream;
+    }
+    onClose(listener) {
+        this.stream.on('close', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('close', listener));
+    }
+    onError(listener) {
+        this.stream.on('error', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('error', listener));
+    }
+    onEnd(listener) {
+        this.stream.on('end', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('end', listener));
+    }
+    write(data, encoding) {
+        return new Promise((resolve, reject) => {
+            const callback = (error) => {
+                if (error === undefined || error === null) {
+                    resolve();
+                }
+                else {
+                    reject(error);
+                }
+            };
+            if (typeof data === 'string') {
+                this.stream.write(data, encoding, callback);
+            }
+            else {
+                this.stream.write(data, callback);
+            }
+        });
+    }
+    end() {
+        this.stream.end();
+    }
+}
+const _ril = Object.freeze({
+    messageBuffer: Object.freeze({
+        create: (encoding) => new MessageBuffer(encoding)
+    }),
+    applicationJson: Object.freeze({
+        encoder: Object.freeze({
+            name: 'application/json',
+            encode: (msg, options) => {
+                return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));
+            }
+        }),
+        decoder: Object.freeze({
+            name: 'application/json',
+            decode: (buffer, options) => {
+                if (buffer instanceof Buffer) {
+                    return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
+                }
+                else {
+                    return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));
+                }
+            }
+        })
+    }),
+    stream: Object.freeze({
+        asReadableStream: (socket) => new ReadableStreamWrapper(socket),
+        asWritableStream: (socket) => new WritableStreamWrapper(socket)
+    }),
+    console: console,
+    timer: Object.freeze({
+        setTimeout(callback, ms, ...args) {
+            return setTimeout(callback, ms, ...args);
+        },
+        clearTimeout(handle) {
+            clearTimeout(handle);
+        },
+        setImmediate(callback, ...args) {
+            return setImmediate(callback, ...args);
+        },
+        clearImmediate(handle) {
+            clearImmediate(handle);
+        }
+    })
+});
+function RIL() {
+    return _ril;
+}
+(function (RIL) {
+    function install() {
+        ral_1.default.install(_ril);
+    }
+    RIL.install = install;
+})(RIL || (RIL = {}));
+exports.default = RIL;
+//# sourceMappingURL=ril.js.map
+
+/***/ }),
+/* 8 */
+/***/ ((__unused_webpack_module, exports) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+let _ral;
+function RAL() {
+    if (_ral === undefined) {
+        throw new Error(`No runtime abstraction layer installed`);
+    }
+    return _ral;
+}
+(function (RAL) {
+    function install(ral) {
+        if (ral === undefined) {
+            throw new Error(`No runtime abstraction layer provided`);
+        }
+        _ral = ral;
+    }
+    RAL.install = install;
+})(RAL || (RAL = {}));
+exports.default = RAL;
+//# sourceMappingURL=ral.js.map
+
+/***/ }),
+/* 9 */
+/***/ ((__unused_webpack_module, exports) => {
+
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+var Disposable;
+(function (Disposable) {
+    function create(func) {
+        return {
+            dispose: func
+        };
+    }
+    Disposable.create = create;
+})(Disposable = exports.Disposable || (exports.Disposable = {}));
+//# sourceMappingURL=disposable.js.map
+
+/***/ }),
+/* 10 */
+/***/ ((module) => {
+
+module.exports = require("util");;
+
+/***/ }),
+/* 11 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+/// <reference path="../../typings/thenable.d.ts" />
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const messages_1 = __webpack_require__(12);
+exports.RequestType = messages_1.RequestType;
+exports.RequestType0 = messages_1.RequestType0;
+exports.RequestType1 = messages_1.RequestType1;
+exports.RequestType2 = messages_1.RequestType2;
+exports.RequestType3 = messages_1.RequestType3;
+exports.RequestType4 = messages_1.RequestType4;
+exports.RequestType5 = messages_1.RequestType5;
+exports.RequestType6 = messages_1.RequestType6;
+exports.RequestType7 = messages_1.RequestType7;
+exports.RequestType8 = messages_1.RequestType8;
+exports.RequestType9 = messages_1.RequestType9;
+exports.ResponseError = messages_1.ResponseError;
+exports.ErrorCodes = messages_1.ErrorCodes;
+exports.NotificationType = messages_1.NotificationType;
+exports.NotificationType0 = messages_1.NotificationType0;
+exports.NotificationType1 = messages_1.NotificationType1;
+exports.NotificationType2 = messages_1.NotificationType2;
+exports.NotificationType3 = messages_1.NotificationType3;
+exports.NotificationType4 = messages_1.NotificationType4;
+exports.NotificationType5 = messages_1.NotificationType5;
+exports.NotificationType6 = messages_1.NotificationType6;
+exports.NotificationType7 = messages_1.NotificationType7;
+exports.NotificationType8 = messages_1.NotificationType8;
+exports.NotificationType9 = messages_1.NotificationType9;
+const disposable_1 = __webpack_require__(9);
+exports.Disposable = disposable_1.Disposable;
+const events_1 = __webpack_require__(14);
+exports.Event = events_1.Event;
+exports.Emitter = events_1.Emitter;
+const cancellation_1 = __webpack_require__(15);
+exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
+exports.CancellationToken = cancellation_1.CancellationToken;
+const messageReader_1 = __webpack_require__(16);
+exports.MessageReader = messageReader_1.MessageReader;
+exports.AbstractMessageReader = messageReader_1.AbstractMessageReader;
+exports.ReadableStreamMessageReader = messageReader_1.ReadableStreamMessageReader;
+const messageWriter_1 = __webpack_require__(17);
+exports.MessageWriter = messageWriter_1.MessageWriter;
+exports.AbstractMessageWriter = messageWriter_1.AbstractMessageWriter;
+exports.WriteableStreamMessageWriter = messageWriter_1.WriteableStreamMessageWriter;
+const connection_1 = __webpack_require__(19);
+exports.ConnectionStrategy = connection_1.ConnectionStrategy;
+exports.ConnectionOptions = connection_1.ConnectionOptions;
+exports.NullLogger = connection_1.NullLogger;
+exports.createMessageConnection = connection_1.createMessageConnection;
+exports.ProgressType = connection_1.ProgressType;
+exports.Trace = connection_1.Trace;
+exports.TraceFormat = connection_1.TraceFormat;
+exports.SetTraceNotification = connection_1.SetTraceNotification;
+exports.LogTraceNotification = connection_1.LogTraceNotification;
+exports.ConnectionErrors = connection_1.ConnectionErrors;
+exports.ConnectionError = connection_1.ConnectionError;
+exports.CancellationReceiverStrategy = connection_1.CancellationReceiverStrategy;
+exports.CancellationSenderStrategy = connection_1.CancellationSenderStrategy;
+exports.CancellationStrategy = connection_1.CancellationStrategy;
+const ral_1 = __webpack_require__(8);
+exports.RAL = ral_1.default;
+//# sourceMappingURL=api.js.map
+
+/***/ }),
+/* 12 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const is = __webpack_require__(13);
+/**
+ * Predefined error codes.
+ */
+var ErrorCodes;
+(function (ErrorCodes) {
+    // Defined by JSON RPC
+    ErrorCodes.ParseError = -32700;
+    ErrorCodes.InvalidRequest = -32600;
+    ErrorCodes.MethodNotFound = -32601;
+    ErrorCodes.InvalidParams = -32602;
+    ErrorCodes.InternalError = -32603;
+    ErrorCodes.serverErrorStart = -32099;
+    ErrorCodes.serverErrorEnd = -32000;
+    ErrorCodes.ServerNotInitialized = -32002;
+    ErrorCodes.UnknownErrorCode = -32001;
+    // Defined by the protocol.
+    ErrorCodes.RequestCancelled = -32800;
+    ErrorCodes.ContentModified = -32801;
+    // Defined by VSCode library.
+    ErrorCodes.MessageWriteError = 1;
+    ErrorCodes.MessageReadError = 2;
+})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
+/**
+ * An error object return in a response in case a request
+ * has failed.
+ */
+class ResponseError extends Error {
+    constructor(code, message, data) {
+        super(message);
+        this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
+        this.data = data;
+        Object.setPrototypeOf(this, ResponseError.prototype);
+    }
+    toJson() {
+        return {
+            code: this.code,
+            message: this.message,
+            data: this.data,
+        };
+    }
+}
+exports.ResponseError = ResponseError;
+/**
+ * An abstract implementation of a MessageType.
+ */
+class AbstractMessageSignature {
+    constructor(_method, _numberOfParams) {
+        this._method = _method;
+        this._numberOfParams = _numberOfParams;
+    }
+    get method() {
+        return this._method;
+    }
+    get numberOfParams() {
+        return this._numberOfParams;
+    }
+}
+exports.AbstractMessageSignature = AbstractMessageSignature;
+/**
+ * Classes to type request response pairs
+ *
+ * The type parameter RO will be removed in the next major version
+ * of the JSON RPC library since it is a LSP concept and doesn't
+ * belong here. For now it is tagged as default never.
+ */
+class RequestType0 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 0);
+    }
+}
+exports.RequestType0 = RequestType0;
+class RequestType extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+    }
+}
+exports.RequestType = RequestType;
+class RequestType1 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+    }
+}
+exports.RequestType1 = RequestType1;
+class RequestType2 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 2);
+    }
+}
+exports.RequestType2 = RequestType2;
+class RequestType3 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 3);
+    }
+}
+exports.RequestType3 = RequestType3;
+class RequestType4 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 4);
+    }
+}
+exports.RequestType4 = RequestType4;
+class RequestType5 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 5);
+    }
+}
+exports.RequestType5 = RequestType5;
+class RequestType6 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 6);
+    }
+}
+exports.RequestType6 = RequestType6;
+class RequestType7 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 7);
+    }
+}
+exports.RequestType7 = RequestType7;
+class RequestType8 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 8);
+    }
+}
+exports.RequestType8 = RequestType8;
+class RequestType9 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 9);
+    }
+}
+exports.RequestType9 = RequestType9;
+/**
+ * The type parameter RO will be removed in the next major version
+ * of the JSON RPC library since it is a LSP concept and doesn't
+ * belong here. For now it is tagged as default never.
+ */
+class NotificationType extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+        this._ = undefined;
+    }
+}
+exports.NotificationType = NotificationType;
+class NotificationType0 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 0);
+    }
+}
+exports.NotificationType0 = NotificationType0;
+class NotificationType1 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+    }
+}
+exports.NotificationType1 = NotificationType1;
+class NotificationType2 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 2);
+    }
+}
+exports.NotificationType2 = NotificationType2;
+class NotificationType3 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 3);
+    }
+}
+exports.NotificationType3 = NotificationType3;
+class NotificationType4 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 4);
+    }
+}
+exports.NotificationType4 = NotificationType4;
+class NotificationType5 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 5);
+    }
+}
+exports.NotificationType5 = NotificationType5;
+class NotificationType6 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 6);
+    }
+}
+exports.NotificationType6 = NotificationType6;
+class NotificationType7 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 7);
+    }
+}
+exports.NotificationType7 = NotificationType7;
+class NotificationType8 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 8);
+    }
+}
+exports.NotificationType8 = NotificationType8;
+class NotificationType9 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 9);
+    }
+}
+exports.NotificationType9 = NotificationType9;
+/**
+ * Tests if the given message is a request message
+ */
+function isRequestMessage(message) {
+    const candidate = message;
+    return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
+}
+exports.isRequestMessage = isRequestMessage;
+/**
+ * Tests if the given message is a notification message
+ */
+function isNotificationMessage(message) {
+    const candidate = message;
+    return candidate && is.string(candidate.method) && message.id === void 0;
+}
+exports.isNotificationMessage = isNotificationMessage;
+/**
+ * Tests if the given message is a response message
+ */
+function isResponseMessage(message) {
+    const candidate = message;
+    return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
+}
+exports.isResponseMessage = isResponseMessage;
+//# sourceMappingURL=messages.js.map
+
+/***/ }),
+/* 13 */
+/***/ ((__unused_webpack_module, exports) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+function boolean(value) {
+    return value === true || value === false;
+}
+exports.boolean = boolean;
+function string(value) {
+    return typeof value === 'string' || value instanceof String;
+}
+exports.string = string;
+function number(value) {
+    return typeof value === 'number' || value instanceof Number;
+}
+exports.number = number;
+function error(value) {
+    return value instanceof Error;
+}
+exports.error = error;
+function func(value) {
+    return typeof value === 'function';
+}
+exports.func = func;
+function array(value) {
+    return Array.isArray(value);
+}
+exports.array = array;
+function stringArray(value) {
+    return array(value) && value.every(elem => string(elem));
+}
+exports.stringArray = stringArray;
+//# sourceMappingURL=is.js.map
+
+/***/ }),
+/* 14 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const ral_1 = __webpack_require__(8);
+var Event;
+(function (Event) {
+    const _disposable = { dispose() { } };
+    Event.None = function () { return _disposable; };
+})(Event = exports.Event || (exports.Event = {}));
+class CallbackList {
+    add(callback, context = null, bucket) {
+        if (!this._callbacks) {
+            this._callbacks = [];
+            this._contexts = [];
+        }
+        this._callbacks.push(callback);
+        this._contexts.push(context);
+        if (Array.isArray(bucket)) {
+            bucket.push({ dispose: () => this.remove(callback, context) });
+        }
+    }
+    remove(callback, context = null) {
+        if (!this._callbacks) {
+            return;
+        }
+        let foundCallbackWithDifferentContext = false;
+        for (let i = 0, len = this._callbacks.length; i < len; i++) {
+            if (this._callbacks[i] === callback) {
+                if (this._contexts[i] === context) {
+                    // callback & context match => remove it
+                    this._callbacks.splice(i, 1);
+                    this._contexts.splice(i, 1);
+                    return;
+                }
+                else {
+                    foundCallbackWithDifferentContext = true;
+                }
+            }
+        }
+        if (foundCallbackWithDifferentContext) {
+            throw new Error('When adding a listener with a context, you should remove it with the same context');
+        }
+    }
+    invoke(...args) {
+        if (!this._callbacks) {
+            return [];
+        }
+        const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
+        for (let i = 0, len = callbacks.length; i < len; i++) {
+            try {
+                ret.push(callbacks[i].apply(contexts[i], args));
+            }
+            catch (e) {
+                // eslint-disable-next-line no-console
+                ral_1.default().console.error(e);
+            }
+        }
+        return ret;
+    }
+    isEmpty() {
+        return !this._callbacks || this._callbacks.length === 0;
+    }
+    dispose() {
+        this._callbacks = undefined;
+        this._contexts = undefined;
+    }
+}
+class Emitter {
+    constructor(_options) {
+        this._options = _options;
+    }
+    /**
+     * For the public to allow to subscribe
+     * to events from this Emitter
+     */
+    get event() {
+        if (!this._event) {
+            this._event = (listener, thisArgs, disposables) => {
+                if (!this._callbacks) {
+                    this._callbacks = new CallbackList();
+                }
+                if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
+                    this._options.onFirstListenerAdd(this);
+                }
+                this._callbacks.add(listener, thisArgs);
+                const result = {
+                    dispose: () => {
+                        if (!this._callbacks) {
+                            // disposable is disposed after emitter is disposed.
+                            return;
+                        }
+                        this._callbacks.remove(listener, thisArgs);
+                        result.dispose = Emitter._noop;
+                        if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
+                            this._options.onLastListenerRemove(this);
+                        }
+                    }
+                };
+                if (Array.isArray(disposables)) {
+                    disposables.push(result);
+                }
+                return result;
+            };
+        }
+        return this._event;
+    }
+    /**
+     * To be kept private to fire an event to
+     * subscribers
+     */
+    fire(event) {
+        if (this._callbacks) {
+            this._callbacks.invoke.call(this._callbacks, event);
+        }
+    }
+    dispose() {
+        if (this._callbacks) {
+            this._callbacks.dispose();
+            this._callbacks = undefined;
+        }
+    }
+}
+exports.Emitter = Emitter;
+Emitter._noop = function () { };
+//# sourceMappingURL=events.js.map
+
+/***/ }),
+/* 15 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const ral_1 = __webpack_require__(8);
+const Is = __webpack_require__(13);
+const events_1 = __webpack_require__(14);
+var CancellationToken;
+(function (CancellationToken) {
+    CancellationToken.None = Object.freeze({
+        isCancellationRequested: false,
+        onCancellationRequested: events_1.Event.None
+    });
+    CancellationToken.Cancelled = Object.freeze({
+        isCancellationRequested: true,
+        onCancellationRequested: events_1.Event.None
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && (candidate === CancellationToken.None
+            || candidate === CancellationToken.Cancelled
+            || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
+    }
+    CancellationToken.is = is;
+})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
+const shortcutEvent = Object.freeze(function (callback, context) {
+    const handle = ral_1.default().timer.setTimeout(callback.bind(context), 0);
+    return { dispose() { ral_1.default().timer.clearTimeout(handle); } };
+});
+class MutableToken {
+    constructor() {
+        this._isCancelled = false;
+    }
+    cancel() {
+        if (!this._isCancelled) {
+            this._isCancelled = true;
+            if (this._emitter) {
+                this._emitter.fire(undefined);
+                this.dispose();
+            }
+        }
+    }
+    get isCancellationRequested() {
+        return this._isCancelled;
+    }
+    get onCancellationRequested() {
+        if (this._isCancelled) {
+            return shortcutEvent;
+        }
+        if (!this._emitter) {
+            this._emitter = new events_1.Emitter();
+        }
+        return this._emitter.event;
+    }
+    dispose() {
+        if (this._emitter) {
+            this._emitter.dispose();
+            this._emitter = undefined;
+        }
+    }
+}
+class CancellationTokenSource {
+    get token() {
+        if (!this._token) {
+            // be lazy and create the token only when
+            // actually needed
+            this._token = new MutableToken();
+        }
+        return this._token;
+    }
+    cancel() {
+        if (!this._token) {
+            // save an object by returning the default
+            // cancelled token when cancellation happens
+            // before someone asks for the token
+            this._token = CancellationToken.Cancelled;
+        }
+        else {
+            this._token.cancel();
+        }
+    }
+    dispose() {
+        if (!this._token) {
+            // ensure to initialize with an empty token if we had none
+            this._token = CancellationToken.None;
+        }
+        else if (this._token instanceof MutableToken) {
+            // actually dispose
+            this._token.dispose();
+        }
+    }
+}
+exports.CancellationTokenSource = CancellationTokenSource;
+//# sourceMappingURL=cancellation.js.map
+
+/***/ }),
+/* 16 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const ral_1 = __webpack_require__(8);
+const Is = __webpack_require__(13);
+const events_1 = __webpack_require__(14);
+var MessageReader;
+(function (MessageReader) {
+    function is(value) {
+        let candidate = value;
+        return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
+            Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
+    }
+    MessageReader.is = is;
+})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
+class AbstractMessageReader {
+    constructor() {
+        this.errorEmitter = new events_1.Emitter();
+        this.closeEmitter = new events_1.Emitter();
+        this.partialMessageEmitter = new events_1.Emitter();
+    }
+    dispose() {
+        this.errorEmitter.dispose();
+        this.closeEmitter.dispose();
+    }
+    get onError() {
+        return this.errorEmitter.event;
+    }
+    fireError(error) {
+        this.errorEmitter.fire(this.asError(error));
+    }
+    get onClose() {
+        return this.closeEmitter.event;
+    }
+    fireClose() {
+        this.closeEmitter.fire(undefined);
+    }
+    get onPartialMessage() {
+        return this.partialMessageEmitter.event;
+    }
+    firePartialMessage(info) {
+        this.partialMessageEmitter.fire(info);
+    }
+    asError(error) {
+        if (error instanceof Error) {
+            return error;
+        }
+        else {
+            return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
+        }
+    }
+}
+exports.AbstractMessageReader = AbstractMessageReader;
+var ResolvedMessageReaderOptions;
+(function (ResolvedMessageReaderOptions) {
+    function fromOptions(options) {
+        var _a;
+        let charset;
+        let result;
+        let contentDecoder;
+        const contentDecoders = new Map();
+        let contentTypeDecoder;
+        const contentTypeDecoders = new Map();
+        if (options === undefined || typeof options === 'string') {
+            charset = options !== null && options !== void 0 ? options : 'utf-8';
+        }
+        else {
+            charset = (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8';
+            if (options.contentDecoder !== undefined) {
+                contentDecoder = options.contentDecoder;
+                contentDecoders.set(contentDecoder.name, contentDecoder);
+            }
+            if (options.contentDecoders !== undefined) {
+                for (const decoder of options.contentDecoders) {
+                    contentDecoders.set(decoder.name, decoder);
+                }
+            }
+            if (options.contentTypeDecoder !== undefined) {
+                contentTypeDecoder = options.contentTypeDecoder;
+                contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
+            }
+            if (options.contentTypeDecoders !== undefined) {
+                for (const decoder of options.contentTypeDecoders) {
+                    contentTypeDecoders.set(decoder.name, decoder);
+                }
+            }
+        }
+        if (contentTypeDecoder === undefined) {
+            contentTypeDecoder = ral_1.default().applicationJson.decoder;
+            contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
+        }
+        return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
+    }
+    ResolvedMessageReaderOptions.fromOptions = fromOptions;
+})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
+class ReadableStreamMessageReader extends AbstractMessageReader {
+    constructor(readable, options) {
+        super();
+        this.readable = readable;
+        this.options = ResolvedMessageReaderOptions.fromOptions(options);
+        this.buffer = ral_1.default().messageBuffer.create(this.options.charset);
+        this._partialMessageTimeout = 10000;
+        this.nextMessageLength = -1;
+        this.messageToken = 0;
+    }
+    set partialMessageTimeout(timeout) {
+        this._partialMessageTimeout = timeout;
+    }
+    get partialMessageTimeout() {
+        return this._partialMessageTimeout;
+    }
+    listen(callback) {
+        this.nextMessageLength = -1;
+        this.messageToken = 0;
+        this.partialMessageTimer = undefined;
+        this.callback = callback;
+        const result = this.readable.onData((data) => {
+            this.onData(data);
+        });
+        this.readable.onError((error) => this.fireError(error));
+        this.readable.onClose(() => this.fireClose());
+        return result;
+    }
+    onData(data) {
+        this.buffer.append(data);
+        while (true) {
+            if (this.nextMessageLength === -1) {
+                const headers = this.buffer.tryReadHeaders();
+                if (!headers) {
+                    return;
+                }
+                const contentLength = headers.get('Content-Length');
+                if (!contentLength) {
+                    throw new Error('Header must provide a Content-Length property.');
+                }
+                const length = parseInt(contentLength);
+                if (isNaN(length)) {
+                    throw new Error('Content-Length value must be a number.');
+                }
+                this.nextMessageLength = length;
+            }
+            const body = this.buffer.tryReadBody(this.nextMessageLength);
+            if (body === undefined) {
+                /** We haven't received the full message yet. */
+                this.setPartialMessageTimer();
+                return;
+            }
+            this.clearPartialMessageTimer();
+            this.nextMessageLength = -1;
+            let p;
+            if (this.options.contentDecoder !== undefined) {
+                p = this.options.contentDecoder.decode(body);
+            }
+            else {
+                p = Promise.resolve(body);
+            }
+            p.then((value) => {
+                this.options.contentTypeDecoder.decode(value, this.options).then((msg) => {
+                    this.callback(msg);
+                }, (error) => {
+                    this.fireError(error);
+                });
+            }, (error) => {
+                this.fireError(error);
+            });
+        }
+    }
+    clearPartialMessageTimer() {
+        if (this.partialMessageTimer) {
+            ral_1.default().timer.clearTimeout(this.partialMessageTimer);
+            this.partialMessageTimer = undefined;
+        }
+    }
+    setPartialMessageTimer() {
+        this.clearPartialMessageTimer();
+        if (this._partialMessageTimeout <= 0) {
+            return;
+        }
+        this.partialMessageTimer = ral_1.default().timer.setTimeout((token, timeout) => {
+            this.partialMessageTimer = undefined;
+            if (token === this.messageToken) {
+                this.firePartialMessage({ messageToken: token, waitingTime: timeout });
+                this.setPartialMessageTimer();
+            }
+        }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
+    }
+}
+exports.ReadableStreamMessageReader = ReadableStreamMessageReader;
+//# sourceMappingURL=messageReader.js.map
+
+/***/ }),
+/* 17 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const ral_1 = __webpack_require__(8);
+const Is = __webpack_require__(13);
+const semaphore_1 = __webpack_require__(18);
+const events_1 = __webpack_require__(14);
+const ContentLength = 'Content-Length: ';
+const CRLF = '\r\n';
+var MessageWriter;
+(function (MessageWriter) {
+    function is(value) {
+        let candidate = value;
+        return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
+            Is.func(candidate.onError) && Is.func(candidate.write);
+    }
+    MessageWriter.is = is;
+})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
+class AbstractMessageWriter {
+    constructor() {
+        this.errorEmitter = new events_1.Emitter();
+        this.closeEmitter = new events_1.Emitter();
+    }
+    dispose() {
+        this.errorEmitter.dispose();
+        this.closeEmitter.dispose();
+    }
+    get onError() {
+        return this.errorEmitter.event;
+    }
+    fireError(error, message, count) {
+        this.errorEmitter.fire([this.asError(error), message, count]);
+    }
+    get onClose() {
+        return this.closeEmitter.event;
+    }
+    fireClose() {
+        this.closeEmitter.fire(undefined);
+    }
+    asError(error) {
+        if (error instanceof Error) {
+            return error;
+        }
+        else {
+            return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
+        }
+    }
+}
+exports.AbstractMessageWriter = AbstractMessageWriter;
+var ResolvedMessageWriterOptions;
+(function (ResolvedMessageWriterOptions) {
+    function fromOptions(options) {
+        var _a, _b;
+        if (options === undefined || typeof options === 'string') {
+            return { charset: options !== null && options !== void 0 ? options : 'utf-8', contentTypeEncoder: ral_1.default().applicationJson.encoder };
+        }
+        else {
+            return { charset: (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: (_b = options.contentTypeEncoder) !== null && _b !== void 0 ? _b : ral_1.default().applicationJson.encoder };
+        }
+    }
+    ResolvedMessageWriterOptions.fromOptions = fromOptions;
+})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
+class WriteableStreamMessageWriter extends AbstractMessageWriter {
+    constructor(writable, options) {
+        super();
+        this.writable = writable;
+        this.options = ResolvedMessageWriterOptions.fromOptions(options);
+        this.errorCount = 0;
+        this.writeSemaphore = new semaphore_1.Semaphore(1);
+        this.writable.onError((error) => this.fireError(error));
+        this.writable.onClose(() => this.fireClose());
+    }
+    async write(msg) {
+        const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
+            if (this.options.contentEncoder !== undefined) {
+                return this.options.contentEncoder.encode(buffer);
+            }
+            else {
+                return buffer;
+            }
+        });
+        return payload.then((buffer) => {
+            const headers = [];
+            headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
+            headers.push(CRLF);
+            return this.doWrite(msg, headers, buffer);
+        }, (error) => {
+            this.fireError(error);
+            throw error;
+        });
+    }
+    doWrite(msg, headers, data) {
+        return this.writeSemaphore.lock(async () => {
+            try {
+                await this.writable.write(headers.join(''), 'ascii');
+                return this.writable.write(data);
+            }
+            catch (error) {
+                this.handleError(error, msg);
+            }
+        });
+    }
+    handleError(error, msg) {
+        this.errorCount++;
+        this.fireError(error, msg, this.errorCount);
+    }
+}
+exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
+//# sourceMappingURL=messageWriter.js.map
+
+/***/ }),
+/* 18 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const ral_1 = __webpack_require__(8);
+class Semaphore {
+    constructor(capacity = 1) {
+        if (capacity <= 0) {
+            throw new Error('Capacity must be greater than 0');
+        }
+        this._capacity = capacity;
+        this._active = 0;
+        this._waiting = [];
+    }
+    lock(thunk) {
+        return new Promise((resolve, reject) => {
+            this._waiting.push({ thunk, resolve, reject });
+            this.runNext();
+        });
+    }
+    get active() {
+        return this._active;
+    }
+    runNext() {
+        if (this._waiting.length === 0 || this._active === this._capacity) {
+            return;
+        }
+        ral_1.default().timer.setImmediate(() => this.doRunNext());
+    }
+    doRunNext() {
+        if (this._waiting.length === 0 || this._active === this._capacity) {
+            return;
+        }
+        const next = this._waiting.shift();
+        this._active++;
+        if (this._active > this._capacity) {
+            throw new Error(`To many thunks active`);
+        }
+        try {
+            const result = next.thunk();
+            if (result instanceof Promise) {
+                result.then((value) => {
+                    this._active--;
+                    next.resolve(value);
+                    this.runNext();
+                }, (err) => {
+                    this._active--;
+                    next.reject(err);
+                    this.runNext();
+                });
+            }
+            else {
+                this._active--;
+                next.resolve(result);
+                this.runNext();
+            }
+        }
+        catch (err) {
+            this._active--;
+            next.reject(err);
+            this.runNext();
+        }
+    }
+}
+exports.Semaphore = Semaphore;
+//# sourceMappingURL=semaphore.js.map
+
+/***/ }),
+/* 19 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const ral_1 = __webpack_require__(8);
+const Is = __webpack_require__(13);
+const messages_1 = __webpack_require__(12);
+const linkedMap_1 = __webpack_require__(20);
+const events_1 = __webpack_require__(14);
+const cancellation_1 = __webpack_require__(15);
+var CancelNotification;
+(function (CancelNotification) {
+    CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
+})(CancelNotification || (CancelNotification = {}));
+var ProgressNotification;
+(function (ProgressNotification) {
+    ProgressNotification.type = new messages_1.NotificationType('$/progress');
+})(ProgressNotification || (ProgressNotification = {}));
+class ProgressType {
+    constructor() {
+    }
+}
+exports.ProgressType = ProgressType;
+exports.NullLogger = Object.freeze({
+    error: () => { },
+    warn: () => { },
+    info: () => { },
+    log: () => { }
+});
+var Trace;
+(function (Trace) {
+    Trace[Trace["Off"] = 0] = "Off";
+    Trace[Trace["Messages"] = 1] = "Messages";
+    Trace[Trace["Verbose"] = 2] = "Verbose";
+})(Trace = exports.Trace || (exports.Trace = {}));
+(function (Trace) {
+    function fromString(value) {
+        if (!Is.string(value)) {
+            return Trace.Off;
+        }
+        value = value.toLowerCase();
+        switch (value) {
+            case 'off':
+                return Trace.Off;
+            case 'messages':
+                return Trace.Messages;
+            case 'verbose':
+                return Trace.Verbose;
+            default:
+                return Trace.Off;
+        }
+    }
+    Trace.fromString = fromString;
+    function toString(value) {
+        switch (value) {
+            case Trace.Off:
+                return 'off';
+            case Trace.Messages:
+                return 'messages';
+            case Trace.Verbose:
+                return 'verbose';
+            default:
+                return 'off';
+        }
+    }
+    Trace.toString = toString;
+})(Trace = exports.Trace || (exports.Trace = {}));
+var TraceFormat;
+(function (TraceFormat) {
+    TraceFormat["Text"] = "text";
+    TraceFormat["JSON"] = "json";
+})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
+(function (TraceFormat) {
+    function fromString(value) {
+        value = value.toLowerCase();
+        if (value === 'json') {
+            return TraceFormat.JSON;
+        }
+        else {
+            return TraceFormat.Text;
+        }
+    }
+    TraceFormat.fromString = fromString;
+})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
+var SetTraceNotification;
+(function (SetTraceNotification) {
+    SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
+})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
+var LogTraceNotification;
+(function (LogTraceNotification) {
+    LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
+})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
+var ConnectionErrors;
+(function (ConnectionErrors) {
+    /**
+     * The connection is closed.
+     */
+    ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
+    /**
+     * The connection got disposed.
+     */
+    ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
+    /**
+     * The connection is already in listening mode.
+     */
+    ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
+})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
+class ConnectionError extends Error {
+    constructor(code, message) {
+        super(message);
+        this.code = code;
+        Object.setPrototypeOf(this, ConnectionError.prototype);
+    }
+}
+exports.ConnectionError = ConnectionError;
+var ConnectionStrategy;
+(function (ConnectionStrategy) {
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.func(candidate.cancelUndispatched);
+    }
+    ConnectionStrategy.is = is;
+})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
+var CancellationReceiverStrategy;
+(function (CancellationReceiverStrategy) {
+    CancellationReceiverStrategy.Message = Object.freeze({
+        createCancellationTokenSource(_) {
+            return new cancellation_1.CancellationTokenSource();
+        }
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.func(candidate.createCancellationTokenSource);
+    }
+    CancellationReceiverStrategy.is = is;
+})(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {}));
+var CancellationSenderStrategy;
+(function (CancellationSenderStrategy) {
+    CancellationSenderStrategy.Message = Object.freeze({
+        sendCancellation(conn, id) {
+            conn.sendNotification(CancelNotification.type, { id });
+        },
+        cleanup(_) { }
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
+    }
+    CancellationSenderStrategy.is = is;
+})(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {}));
+var CancellationStrategy;
+(function (CancellationStrategy) {
+    CancellationStrategy.Message = Object.freeze({
+        receiver: CancellationReceiverStrategy.Message,
+        sender: CancellationSenderStrategy.Message
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
+    }
+    CancellationStrategy.is = is;
+})(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {}));
+var ConnectionOptions;
+(function (ConnectionOptions) {
+    function is(value) {
+        const candidate = value;
+        return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy));
+    }
+    ConnectionOptions.is = is;
+})(ConnectionOptions = exports.ConnectionOptions || (exports.ConnectionOptions = {}));
+var ConnectionState;
+(function (ConnectionState) {
+    ConnectionState[ConnectionState["New"] = 1] = "New";
+    ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
+    ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
+    ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
+})(ConnectionState || (ConnectionState = {}));
+function createMessageConnection(messageReader, messageWriter, _logger, options) {
+    const logger = _logger !== undefined ? _logger : exports.NullLogger;
+    let sequenceNumber = 0;
+    let notificationSquenceNumber = 0;
+    let unknownResponseSquenceNumber = 0;
+    const version = '2.0';
+    let starRequestHandler = undefined;
+    const requestHandlers = Object.create(null);
+    let starNotificationHandler = undefined;
+    const notificationHandlers = Object.create(null);
+    const progressHandlers = new Map();
+    let timer;
+    let messageQueue = new linkedMap_1.LinkedMap();
+    let responsePromises = Object.create(null);
+    let requestTokens = Object.create(null);
+    let trace = Trace.Off;
+    let traceFormat = TraceFormat.Text;
+    let tracer;
+    let state = ConnectionState.New;
+    const errorEmitter = new events_1.Emitter();
+    const closeEmitter = new events_1.Emitter();
+    const unhandledNotificationEmitter = new events_1.Emitter();
+    const unhandledProgressEmitter = new events_1.Emitter();
+    const disposeEmitter = new events_1.Emitter();
+    const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;
+    function createRequestQueueKey(id) {
+        return 'req-' + id.toString();
+    }
+    function createResponseQueueKey(id) {
+        if (id === null) {
+            return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
+        }
+        else {
+            return 'res-' + id.toString();
+        }
+    }
+    function createNotificationQueueKey() {
+        return 'not-' + (++notificationSquenceNumber).toString();
+    }
+    function addMessageToQueue(queue, message) {
+        if (messages_1.isRequestMessage(message)) {
+            queue.set(createRequestQueueKey(message.id), message);
+        }
+        else if (messages_1.isResponseMessage(message)) {
+            queue.set(createResponseQueueKey(message.id), message);
+        }
+        else {
+            queue.set(createNotificationQueueKey(), message);
+        }
+    }
+    function cancelUndispatched(_message) {
+        return undefined;
+    }
+    function isListening() {
+        return state === ConnectionState.Listening;
+    }
+    function isClosed() {
+        return state === ConnectionState.Closed;
+    }
+    function isDisposed() {
+        return state === ConnectionState.Disposed;
+    }
+    function closeHandler() {
+        if (state === ConnectionState.New || state === ConnectionState.Listening) {
+            state = ConnectionState.Closed;
+            closeEmitter.fire(undefined);
+        }
+        // If the connection is disposed don't sent close events.
+    }
+    function readErrorHandler(error) {
+        errorEmitter.fire([error, undefined, undefined]);
+    }
+    function writeErrorHandler(data) {
+        errorEmitter.fire(data);
+    }
+    messageReader.onClose(closeHandler);
+    messageReader.onError(readErrorHandler);
+    messageWriter.onClose(closeHandler);
+    messageWriter.onError(writeErrorHandler);
+    function triggerMessageQueue() {
+        if (timer || messageQueue.size === 0) {
+            return;
+        }
+        timer = ral_1.default().timer.setImmediate(() => {
+            timer = undefined;
+            processMessageQueue();
+        });
+    }
+    function processMessageQueue() {
+        if (messageQueue.size === 0) {
+            return;
+        }
+        const message = messageQueue.shift();
+        try {
+            if (messages_1.isRequestMessage(message)) {
+                handleRequest(message);
+            }
+            else if (messages_1.isNotificationMessage(message)) {
+                handleNotification(message);
+            }
+            else if (messages_1.isResponseMessage(message)) {
+                handleResponse(message);
+            }
+            else {
+                handleInvalidMessage(message);
+            }
+        }
+        finally {
+            triggerMessageQueue();
+        }
+    }
+    const callback = (message) => {
+        try {
+            // We have received a cancellation message. Check if the message is still in the queue
+            // and cancel it if allowed to do so.
+            if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
+                const key = createRequestQueueKey(message.params.id);
+                const toCancel = messageQueue.get(key);
+                if (messages_1.isRequestMessage(toCancel)) {
+                    const strategy = options === null || options === void 0 ? void 0 : options.connectionStrategy;
+                    const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
+                    if (response && (response.error !== undefined || response.result !== undefined)) {
+                        messageQueue.delete(key);
+                        response.id = toCancel.id;
+                        traceSendingResponse(response, message.method, Date.now());
+                        messageWriter.write(response);
+                        return;
+                    }
+                }
+            }
+            addMessageToQueue(messageQueue, message);
+        }
+        finally {
+            triggerMessageQueue();
+        }
+    };
+    function handleRequest(requestMessage) {
+        if (isDisposed()) {
+            // we return here silently since we fired an event when the
+            // connection got disposed.
+            return;
+        }
+        function reply(resultOrError, method, startTime) {
+            const message = {
+                jsonrpc: version,
+                id: requestMessage.id
+            };
+            if (resultOrError instanceof messages_1.ResponseError) {
+                message.error = resultOrError.toJson();
+            }
+            else {
+                message.result = resultOrError === undefined ? null : resultOrError;
+            }
+            traceSendingResponse(message, method, startTime);
+            messageWriter.write(message);
+        }
+        function replyError(error, method, startTime) {
+            const message = {
+                jsonrpc: version,
+                id: requestMessage.id,
+                error: error.toJson()
+            };
+            traceSendingResponse(message, method, startTime);
+            messageWriter.write(message);
+        }
+        function replySuccess(result, method, startTime) {
+            // The JSON RPC defines that a response must either have a result or an error
+            // So we can't treat undefined as a valid response result.
+            if (result === undefined) {
+                result = null;
+            }
+            const message = {
+                jsonrpc: version,
+                id: requestMessage.id,
+                result: result
+            };
+            traceSendingResponse(message, method, startTime);
+            messageWriter.write(message);
+        }
+        traceReceivedRequest(requestMessage);
+        const element = requestHandlers[requestMessage.method];
+        let type;
+        let requestHandler;
+        if (element) {
+            type = element.type;
+            requestHandler = element.handler;
+        }
+        const startTime = Date.now();
+        if (requestHandler || starRequestHandler) {
+            const tokenKey = String(requestMessage.id);
+            const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey);
+            requestTokens[tokenKey] = cancellationSource;
+            try {
+                let handlerResult;
+                if (requestMessage.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
+                    handlerResult = requestHandler
+                        ? requestHandler(cancellationSource.token)
+                        : starRequestHandler(requestMessage.method, cancellationSource.token);
+                }
+                else if (Is.array(requestMessage.params) && (type === undefined || type.numberOfParams > 1)) {
+                    handlerResult = requestHandler
+                        ? requestHandler(...requestMessage.params, cancellationSource.token)
+                        : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
+                }
+                else {
+                    handlerResult = requestHandler
+                        ? requestHandler(requestMessage.params, cancellationSource.token)
+                        : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
+                }
+                const promise = handlerResult;
+                if (!handlerResult) {
+                    delete requestTokens[tokenKey];
+                    replySuccess(handlerResult, requestMessage.method, startTime);
+                }
+                else if (promise.then) {
+                    promise.then((resultOrError) => {
+                        delete requestTokens[tokenKey];
+                        reply(resultOrError, requestMessage.method, startTime);
+                    }, error => {
+                        delete requestTokens[tokenKey];
+                        if (error instanceof messages_1.ResponseError) {
+                            replyError(error, requestMessage.method, startTime);
+                        }
+                        else if (error && Is.string(error.message)) {
+                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
+                        }
+                        else {
+                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
+                        }
+                    });
+                }
+                else {
+                    delete requestTokens[tokenKey];
+                    reply(handlerResult, requestMessage.method, startTime);
+                }
+            }
+            catch (error) {
+                delete requestTokens[tokenKey];
+                if (error instanceof messages_1.ResponseError) {
+                    reply(error, requestMessage.method, startTime);
+                }
+                else if (error && Is.string(error.message)) {
+                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
+                }
+                else {
+                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
+                }
+            }
+        }
+        else {
+            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
+        }
+    }
+    function handleResponse(responseMessage) {
+        if (isDisposed()) {
+            // See handle request.
+            return;
+        }
+        if (responseMessage.id === null) {
+            if (responseMessage.error) {
+                logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
+            }
+            else {
+                logger.error(`Received response message without id. No further error information provided.`);
+            }
+        }
+        else {
+            const key = String(responseMessage.id);
+            const responsePromise = responsePromises[key];
+            traceReceivedResponse(responseMessage, responsePromise);
+            if (responsePromise) {
+                delete responsePromises[key];
+                try {
+                    if (responseMessage.error) {
+                        const error = responseMessage.error;
+                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
+                    }
+                    else if (responseMessage.result !== undefined) {
+                        responsePromise.resolve(responseMessage.result);
+                    }
+                    else {
+                        throw new Error('Should never happen.');
+                    }
+                }
+                catch (error) {
+                    if (error.message) {
+                        logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
+                    }
+                    else {
+                        logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
+                    }
+                }
+            }
+        }
+    }
+    function handleNotification(message) {
+        if (isDisposed()) {
+            // See handle request.
+            return;
+        }
+        let type = undefined;
+        let notificationHandler;
+        if (message.method === CancelNotification.type.method) {
+            notificationHandler = (params) => {
+                const id = params.id;
+                const source = requestTokens[String(id)];
+                if (source) {
+                    source.cancel();
+                }
+            };
+        }
+        else {
+            const element = notificationHandlers[message.method];
+            if (element) {
+                notificationHandler = element.handler;
+                type = element.type;
+            }
+        }
+        if (notificationHandler || starNotificationHandler) {
+            try {
+                traceReceivedNotification(message);
+                if (message.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
+                    notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
+                }
+                else if (Is.array(message.params) && (type === undefined || type.numberOfParams > 1)) {
+                    notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
+                }
+                else {
+                    notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
+                }
+            }
+            catch (error) {
+                if (error.message) {
+                    logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
+                }
+                else {
+                    logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
+                }
+            }
+        }
+        else {
+            unhandledNotificationEmitter.fire(message);
+        }
+    }
+    function handleInvalidMessage(message) {
+        if (!message) {
+            logger.error('Received empty message.');
+            return;
+        }
+        logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
+        // Test whether we find an id to reject the promise
+        const responseMessage = message;
+        if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
+            const key = String(responseMessage.id);
+            const responseHandler = responsePromises[key];
+            if (responseHandler) {
+                responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
+            }
+        }
+    }
+    function traceSendingRequest(message) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose && message.params) {
+                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+            }
+            tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
+        }
+        else {
+            logLSPMessage('send-request', message);
+        }
+    }
+    function traceSendingNotification(message) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.params) {
+                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+                }
+                else {
+                    data = 'No parameters provided.\n\n';
+                }
+            }
+            tracer.log(`Sending notification '${message.method}'.`, data);
+        }
+        else {
+            logLSPMessage('send-notification', message);
+        }
+    }
+    function traceSendingResponse(message, method, startTime) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.error && message.error.data) {
+                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
+                }
+                else {
+                    if (message.result) {
+                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
+                    }
+                    else if (message.error === undefined) {
+                        data = 'No result returned.\n\n';
+                    }
+                }
+            }
+            tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
+        }
+        else {
+            logLSPMessage('send-response', message);
+        }
+    }
+    function traceReceivedRequest(message) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose && message.params) {
+                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+            }
+            tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
+        }
+        else {
+            logLSPMessage('receive-request', message);
+        }
+    }
+    function traceReceivedNotification(message) {
+        if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.params) {
+                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+                }
+                else {
+                    data = 'No parameters provided.\n\n';
+                }
+            }
+            tracer.log(`Received notification '${message.method}'.`, data);
+        }
+        else {
+            logLSPMessage('receive-notification', message);
+        }
+    }
+    function traceReceivedResponse(message, responsePromise) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.error && message.error.data) {
+                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
+                }
+                else {
+                    if (message.result) {
+                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
+                    }
+                    else if (message.error === undefined) {
+                        data = 'No result returned.\n\n';
+                    }
+                }
+            }
+            if (responsePromise) {
+                const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
+                tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
+            }
+            else {
+                tracer.log(`Received response ${message.id} without active response promise.`, data);
+            }
+        }
+        else {
+            logLSPMessage('receive-response', message);
+        }
+    }
+    function logLSPMessage(type, message) {
+        if (!tracer || trace === Trace.Off) {
+            return;
+        }
+        const lspMessage = {
+            isLSPMessage: true,
+            type,
+            message,
+            timestamp: Date.now()
+        };
+        tracer.log(lspMessage);
+    }
+    function throwIfClosedOrDisposed() {
+        if (isClosed()) {
+            throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
+        }
+        if (isDisposed()) {
+            throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
+        }
+    }
+    function throwIfListening() {
+        if (isListening()) {
+            throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
+        }
+    }
+    function throwIfNotListening() {
+        if (!isListening()) {
+            throw new Error('Call listen() first.');
+        }
+    }
+    function undefinedToNull(param) {
+        if (param === undefined) {
+            return null;
+        }
+        else {
+            return param;
+        }
+    }
+    function computeMessageParams(type, params) {
+        let result;
+        const numberOfParams = type.numberOfParams;
+        switch (numberOfParams) {
+            case 0:
+                result = null;
+                break;
+            case 1:
+                result = undefinedToNull(params[0]);
+                break;
+            default:
+                result = [];
+                for (let i = 0; i < params.length && i < numberOfParams; i++) {
+                    result.push(undefinedToNull(params[i]));
+                }
+                if (params.length < numberOfParams) {
+                    for (let i = params.length; i < numberOfParams; i++) {
+                        result.push(null);
+                    }
+                }
+                break;
+        }
+        return result;
+    }
+    const connection = {
+        sendNotification: (type, ...params) => {
+            throwIfClosedOrDisposed();
+            let method;
+            let messageParams;
+            if (Is.string(type)) {
+                method = type;
+                switch (params.length) {
+                    case 0:
+                        messageParams = null;
+                        break;
+                    case 1:
+                        messageParams = params[0];
+                        break;
+                    default:
+                        messageParams = params;
+                        break;
+                }
+            }
+            else {
+                method = type.method;
+                messageParams = computeMessageParams(type, params);
+            }
+            const notificationMessage = {
+                jsonrpc: version,
+                method: method,
+                params: messageParams
+            };
+            traceSendingNotification(notificationMessage);
+            messageWriter.write(notificationMessage);
+        },
+        onNotification: (type, handler) => {
+            throwIfClosedOrDisposed();
+            if (Is.func(type)) {
+                starNotificationHandler = type;
+            }
+            else if (handler) {
+                if (Is.string(type)) {
+                    notificationHandlers[type] = { type: undefined, handler };
+                }
+                else {
+                    notificationHandlers[type.method] = { type, handler };
+                }
+            }
+        },
+        onProgress: (_type, token, handler) => {
+            if (progressHandlers.has(token)) {
+                throw new Error(`Progress handler for token ${token} already registered`);
+            }
+            progressHandlers.set(token, handler);
+            return {
+                dispose: () => {
+                    progressHandlers.delete(token);
+                }
+            };
+        },
+        sendProgress: (_type, token, value) => {
+            connection.sendNotification(ProgressNotification.type, { token, value });
+        },
+        onUnhandledProgress: unhandledProgressEmitter.event,
+        sendRequest: (type, ...params) => {
+            throwIfClosedOrDisposed();
+            throwIfNotListening();
+            let method;
+            let messageParams;
+            let token = undefined;
+            if (Is.string(type)) {
+                method = type;
+                switch (params.length) {
+                    case 0:
+                        messageParams = null;
+                        break;
+                    case 1:
+                        // The cancellation token is optional so it can also be undefined.
+                        if (cancellation_1.CancellationToken.is(params[0])) {
+                            messageParams = null;
+                            token = params[0];
+                        }
+                        else {
+                            messageParams = undefinedToNull(params[0]);
+                        }
+                        break;
+                    default:
+                        const last = params.length - 1;
+                        if (cancellation_1.CancellationToken.is(params[last])) {
+                            token = params[last];
+                            if (params.length === 2) {
+                                messageParams = undefinedToNull(params[0]);
+                            }
+                            else {
+                                messageParams = params.slice(0, last).map(value => undefinedToNull(value));
+                            }
+                        }
+                        else {
+                            messageParams = params.map(value => undefinedToNull(value));
+                        }
+                        break;
+                }
+            }
+            else {
+                method = type.method;
+                messageParams = computeMessageParams(type, params);
+                const numberOfParams = type.numberOfParams;
+                token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
+            }
+            const id = sequenceNumber++;
+            let disposable;
+            if (token) {
+                disposable = token.onCancellationRequested(() => {
+                    cancellationStrategy.sender.sendCancellation(connection, id);
+                });
+            }
+            const result = new Promise((resolve, reject) => {
+                const requestMessage = {
+                    jsonrpc: version,
+                    id: id,
+                    method: method,
+                    params: messageParams
+                };
+                const resolveWithCleanup = (r) => {
+                    resolve(r);
+                    cancellationStrategy.sender.cleanup(id);
+                    disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
+                };
+                const rejectWithCleanup = (r) => {
+                    reject(r);
+                    cancellationStrategy.sender.cleanup(id);
+                    disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
+                };
+                let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
+                traceSendingRequest(requestMessage);
+                try {
+                    messageWriter.write(requestMessage);
+                }
+                catch (e) {
+                    // Writing the message failed. So we need to reject the promise.
+                    responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
+                    responsePromise = null;
+                }
+                if (responsePromise) {
+                    responsePromises[String(id)] = responsePromise;
+                }
+            });
+            return result;
+        },
+        onRequest: (type, handler) => {
+            throwIfClosedOrDisposed();
+            if (Is.func(type)) {
+                starRequestHandler = type;
+            }
+            else if (handler) {
+                if (Is.string(type)) {
+                    requestHandlers[type] = { type: undefined, handler };
+                }
+                else {
+                    requestHandlers[type.method] = { type, handler };
+                }
+            }
+        },
+        trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
+            let _sendNotification = false;
+            let _traceFormat = TraceFormat.Text;
+            if (sendNotificationOrTraceOptions !== undefined) {
+                if (Is.boolean(sendNotificationOrTraceOptions)) {
+                    _sendNotification = sendNotificationOrTraceOptions;
+                }
+                else {
+                    _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
+                    _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
+                }
+            }
+            trace = _value;
+            traceFormat = _traceFormat;
+            if (trace === Trace.Off) {
+                tracer = undefined;
+            }
+            else {
+                tracer = _tracer;
+            }
+            if (_sendNotification && !isClosed() && !isDisposed()) {
+                connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
+            }
+        },
+        onError: errorEmitter.event,
+        onClose: closeEmitter.event,
+        onUnhandledNotification: unhandledNotificationEmitter.event,
+        onDispose: disposeEmitter.event,
+        dispose: () => {
+            if (isDisposed()) {
+                return;
+            }
+            state = ConnectionState.Disposed;
+            disposeEmitter.fire(undefined);
+            const error = new Error('Connection got disposed.');
+            Object.keys(responsePromises).forEach((key) => {
+                responsePromises[key].reject(error);
+            });
+            responsePromises = Object.create(null);
+            requestTokens = Object.create(null);
+            messageQueue = new linkedMap_1.LinkedMap();
+            // Test for backwards compatibility
+            if (Is.func(messageWriter.dispose)) {
+                messageWriter.dispose();
+            }
+            if (Is.func(messageReader.dispose)) {
+                messageReader.dispose();
+            }
+        },
+        listen: () => {
+            throwIfClosedOrDisposed();
+            throwIfListening();
+            state = ConnectionState.Listening;
+            messageReader.listen(callback);
+        },
+        inspect: () => {
+            // eslint-disable-next-line no-console
+            ral_1.default().console.log('inspect');
+        }
+    };
+    connection.onNotification(LogTraceNotification.type, (params) => {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
+    });
+    connection.onNotification(ProgressNotification.type, (params) => {
+        const handler = progressHandlers.get(params.token);
+        if (handler) {
+            handler(params.value);
+        }
+        else {
+            unhandledProgressEmitter.fire(params);
+        }
+    });
+    return connection;
+}
+exports.createMessageConnection = createMessageConnection;
+//# sourceMappingURL=connection.js.map
+
+/***/ }),
+/* 20 */
+/***/ ((__unused_webpack_module, exports) => {
+
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+var Touch;
+(function (Touch) {
+    Touch.None = 0;
+    Touch.First = 1;
+    Touch.AsOld = Touch.First;
+    Touch.Last = 2;
+    Touch.AsNew = Touch.Last;
+})(Touch = exports.Touch || (exports.Touch = {}));
+class LinkedMap {
+    constructor() {
+        this[Symbol.toStringTag] = 'LinkedMap';
+        this._map = new Map();
+        this._head = undefined;
+        this._tail = undefined;
+        this._size = 0;
+        this._state = 0;
+    }
+    clear() {
+        this._map.clear();
+        this._head = undefined;
+        this._tail = undefined;
+        this._size = 0;
+        this._state++;
+    }
+    isEmpty() {
+        return !this._head && !this._tail;
+    }
+    get size() {
+        return this._size;
+    }
+    get first() {
+        var _a;
+        return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value;
+    }
+    get last() {
+        var _a;
+        return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value;
+    }
+    has(key) {
+        return this._map.has(key);
+    }
+    get(key, touch = Touch.None) {
+        const item = this._map.get(key);
+        if (!item) {
+            return undefined;
+        }
+        if (touch !== Touch.None) {
+            this.touch(item, touch);
+        }
+        return item.value;
+    }
+    set(key, value, touch = Touch.None) {
+        let item = this._map.get(key);
+        if (item) {
+            item.value = value;
+            if (touch !== Touch.None) {
+                this.touch(item, touch);
+            }
+        }
+        else {
+            item = { key, value, next: undefined, previous: undefined };
+            switch (touch) {
+                case Touch.None:
+                    this.addItemLast(item);
+                    break;
+                case Touch.First:
+                    this.addItemFirst(item);
+                    break;
+                case Touch.Last:
+                    this.addItemLast(item);
+                    break;
+                default:
+                    this.addItemLast(item);
+                    break;
+            }
+            this._map.set(key, item);
+            this._size++;
+        }
+        return this;
+    }
+    delete(key) {
+        return !!this.remove(key);
+    }
+    remove(key) {
+        const item = this._map.get(key);
+        if (!item) {
+            return undefined;
+        }
+        this._map.delete(key);
+        this.removeItem(item);
+        this._size--;
+        return item.value;
+    }
+    shift() {
+        if (!this._head && !this._tail) {
+            return undefined;
+        }
+        if (!this._head || !this._tail) {
+            throw new Error('Invalid list');
+        }
+        const item = this._head;
+        this._map.delete(item.key);
+        this.removeItem(item);
+        this._size--;
+        return item.value;
+    }
+    forEach(callbackfn, thisArg) {
+        const state = this._state;
+        let current = this._head;
+        while (current) {
+            if (thisArg) {
+                callbackfn.bind(thisArg)(current.value, current.key, this);
+            }
+            else {
+                callbackfn(current.value, current.key, this);
+            }
+            if (this._state !== state) {
+                throw new Error(`LinkedMap got modified during iteration.`);
+            }
+            current = current.next;
+        }
+    }
+    keys() {
+        const map = this;
+        const state = this._state;
+        let current = this._head;
+        const iterator = {
+            [Symbol.iterator]() {
+                return iterator;
+            },
+            next() {
+                if (map._state !== state) {
+                    throw new Error(`LinkedMap got modified during iteration.`);
+                }
+                if (current) {
+                    const result = { value: current.key, done: false };
+                    current = current.next;
+                    return result;
+                }
+                else {
+                    return { value: undefined, done: true };
+                }
+            }
+        };
+        return iterator;
+    }
+    values() {
+        const map = this;
+        const state = this._state;
+        let current = this._head;
+        const iterator = {
+            [Symbol.iterator]() {
+                return iterator;
+            },
+            next() {
+                if (map._state !== state) {
+                    throw new Error(`LinkedMap got modified during iteration.`);
+                }
+                if (current) {
+                    const result = { value: current.value, done: false };
+                    current = current.next;
+                    return result;
+                }
+                else {
+                    return { value: undefined, done: true };
+                }
+            }
+        };
+        return iterator;
+    }
+    entries() {
+        const map = this;
+        const state = this._state;
+        let current = this._head;
+        const iterator = {
+            [Symbol.iterator]() {
+                return iterator;
+            },
+            next() {
+                if (map._state !== state) {
+                    throw new Error(`LinkedMap got modified during iteration.`);
+                }
+                if (current) {
+                    const result = { value: [current.key, current.value], done: false };
+                    current = current.next;
+                    return result;
+                }
+                else {
+                    return { value: undefined, done: true };
+                }
             }
+        };
+        return iterator;
+    }
+    [Symbol.iterator]() {
+        return this.entries();
+    }
+    trimOld(newSize) {
+        if (newSize >= this.size) {
+            return;
         }
-    });
-    return dataPaths;
+        if (newSize === 0) {
+            this.clear();
+            return;
+        }
+        let current = this._head;
+        let currentSize = this.size;
+        while (current && currentSize > newSize) {
+            this._map.delete(current.key);
+            current = current.next;
+            currentSize--;
+        }
+        this._head = current;
+        this._size = currentSize;
+        if (current) {
+            current.previous = undefined;
+        }
+        this._state++;
+    }
+    addItemFirst(item) {
+        // First time Insert
+        if (!this._head && !this._tail) {
+            this._tail = item;
+        }
+        else if (!this._head) {
+            throw new Error('Invalid list');
+        }
+        else {
+            item.next = this._head;
+            this._head.previous = item;
+        }
+        this._head = item;
+        this._state++;
+    }
+    addItemLast(item) {
+        // First time Insert
+        if (!this._head && !this._tail) {
+            this._head = item;
+        }
+        else if (!this._tail) {
+            throw new Error('Invalid list');
+        }
+        else {
+            item.previous = this._tail;
+            this._tail.next = item;
+        }
+        this._tail = item;
+        this._state++;
+    }
+    removeItem(item) {
+        if (item === this._head && item === this._tail) {
+            this._head = undefined;
+            this._tail = undefined;
+        }
+        else if (item === this._head) {
+            // This can only happend if size === 1 which is handle
+            // by the case above.
+            if (!item.next) {
+                throw new Error('Invalid list');
+            }
+            item.next.previous = undefined;
+            this._head = item.next;
+        }
+        else if (item === this._tail) {
+            // This can only happend if size === 1 which is handle
+            // by the case above.
+            if (!item.previous) {
+                throw new Error('Invalid list');
+            }
+            item.previous.next = undefined;
+            this._tail = item.previous;
+        }
+        else {
+            const next = item.next;
+            const previous = item.previous;
+            if (!next || !previous) {
+                throw new Error('Invalid list');
+            }
+            next.previous = previous;
+            previous.next = next;
+        }
+        item.next = undefined;
+        item.previous = undefined;
+        this._state++;
+    }
+    touch(item, touch) {
+        if (!this._head || !this._tail) {
+            throw new Error('Invalid list');
+        }
+        if ((touch !== Touch.First && touch !== Touch.Last)) {
+            return;
+        }
+        if (touch === Touch.First) {
+            if (item === this._head) {
+                return;
+            }
+            const next = item.next;
+            const previous = item.previous;
+            // Unlink the item
+            if (item === this._tail) {
+                // previous must be defined since item was not head but is tail
+                // So there are more than on item in the map
+                previous.next = undefined;
+                this._tail = previous;
+            }
+            else {
+                // Both next and previous are not undefined since item was neither head nor tail.
+                next.previous = previous;
+                previous.next = next;
+            }
+            // Insert the node at head
+            item.previous = undefined;
+            item.next = this._head;
+            this._head.previous = item;
+            this._head = item;
+            this._state++;
+        }
+        else if (touch === Touch.Last) {
+            if (item === this._tail) {
+                return;
+            }
+            const next = item.next;
+            const previous = item.previous;
+            // Unlink the item.
+            if (item === this._head) {
+                // next must be defined since item was not tail but is head
+                // So there are more than on item in the map
+                next.previous = undefined;
+                this._head = next;
+            }
+            else {
+                // Both next and previous are not undefined since item was neither head nor tail.
+                next.previous = previous;
+                previous.next = next;
+            }
+            item.next = undefined;
+            item.previous = this._tail;
+            this._tail.next = item;
+            this._tail = item;
+            this._state++;
+        }
+    }
+    toJSON() {
+        const data = [];
+        this.forEach((value, key) => {
+            data.push([key, value]);
+        });
+        return data;
+    }
+    fromJSON(data) {
+        this.clear();
+        for (const [key, value] of data) {
+            this.set(key, value);
+        }
+    }
 }
-exports.getCustomDataPathsInAllWorkspaces = getCustomDataPathsInAllWorkspaces;
-function getCustomDataPathsFromAllExtensions() {
-    const dataPaths = [];
-    for (const extension of coc_nvim_1.extensions.all) {
-        const contributes = extension.packageJSON && extension.packageJSON.contributes;
-        if (contributes &&
-            contributes.html &&
-            contributes.html.experimental.customData &&
-            Array.isArray(contributes.html.experimental.customData)) {
-            const relativePaths = contributes.html.experimental.customData;
-            relativePaths.forEach(rp => {
-                dataPaths.push(path.resolve(extension.extensionPath, rp));
-            });
+exports.LinkedMap = LinkedMap;
+class LRUCache extends LinkedMap {
+    constructor(limit, ratio = 1) {
+        super();
+        this._limit = limit;
+        this._ratio = Math.min(Math.max(0, ratio), 1);
+    }
+    get limit() {
+        return this._limit;
+    }
+    set limit(limit) {
+        this._limit = limit;
+        this.checkTrim();
+    }
+    get ratio() {
+        return this._ratio;
+    }
+    set ratio(ratio) {
+        this._ratio = Math.min(Math.max(0, ratio), 1);
+        this.checkTrim();
+    }
+    get(key, touch = Touch.AsNew) {
+        return super.get(key, touch);
+    }
+    peek(key) {
+        return super.get(key, Touch.None);
+    }
+    set(key, value) {
+        super.set(key, value, Touch.Last);
+        this.checkTrim();
+        return this;
+    }
+    checkTrim() {
+        if (this.size > this._limit) {
+            this.trimOld(Math.round(this._limit * this._ratio));
         }
     }
-    return dataPaths;
 }
-exports.getCustomDataPathsFromAllExtensions = getCustomDataPathsFromAllExtensions;
+exports.LRUCache = LRUCache;
+//# sourceMappingURL=linkedMap.js.map
+
+/***/ }),
+/* 21 */
+/***/ ((module) => {
 
+module.exports = require("os");;
 
 /***/ }),
-/* 3 */
-/***/ (function(module, exports) {
+/* 22 */
+/***/ ((module) => {
 
-module.exports = require("path");
+module.exports = require("crypto");;
 
 /***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 23 */
+/***/ ((module) => {
+
+module.exports = require("net");;
+
+/***/ }),
+/* 24 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
 function __export(m) {
     for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
 }
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
-exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
-exports.ResponseError = vscode_jsonrpc_1.ResponseError;
-exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
-exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
-exports.Disposable = vscode_jsonrpc_1.Disposable;
-exports.Event = vscode_jsonrpc_1.Event;
-exports.Emitter = vscode_jsonrpc_1.Emitter;
-exports.Trace = vscode_jsonrpc_1.Trace;
-exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
-exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
-exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
-exports.RequestType = vscode_jsonrpc_1.RequestType;
-exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
-exports.NotificationType = vscode_jsonrpc_1.NotificationType;
-exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
-exports.MessageReader = vscode_jsonrpc_1.MessageReader;
-exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
-exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
-exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
-exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
-exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
-exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
-exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
-exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
-exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
-exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
-exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
-__export(__webpack_require__(18));
-__export(__webpack_require__(19));
-const callHierarchy = __webpack_require__(29);
-const progress = __webpack_require__(30);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+__export(__webpack_require__(6));
+__export(__webpack_require__(25));
+__export(__webpack_require__(26));
+__export(__webpack_require__(27));
+var connection_1 = __webpack_require__(39);
+exports.createProtocolConnection = connection_1.createProtocolConnection;
+const st = __webpack_require__(40);
 var Proposed;
 (function (Proposed) {
-    let CallHierarchyRequest;
-    (function (CallHierarchyRequest) {
-        CallHierarchyRequest.type = callHierarchy.CallHierarchyRequest.type;
-    })(CallHierarchyRequest = Proposed.CallHierarchyRequest || (Proposed.CallHierarchyRequest = {}));
-    let CallHierarchyDirection;
-    (function (CallHierarchyDirection) {
-        CallHierarchyDirection.CallsFrom = callHierarchy.CallHierarchyDirection.CallsFrom;
-        CallHierarchyDirection.CallsTo = callHierarchy.CallHierarchyDirection.CallsTo;
-    })(CallHierarchyDirection = Proposed.CallHierarchyDirection || (Proposed.CallHierarchyDirection = {}));
-    let ProgressStartNotification;
-    (function (ProgressStartNotification) {
-        ProgressStartNotification.type = progress.ProgressStartNotification.type;
-    })(ProgressStartNotification = Proposed.ProgressStartNotification || (Proposed.ProgressStartNotification = {}));
-    let ProgressReportNotification;
-    (function (ProgressReportNotification) {
-        ProgressReportNotification.type = progress.ProgressReportNotification.type;
-    })(ProgressReportNotification = Proposed.ProgressReportNotification || (Proposed.ProgressReportNotification = {}));
-    let ProgressDoneNotification;
-    (function (ProgressDoneNotification) {
-        ProgressDoneNotification.type = progress.ProgressDoneNotification.type;
-    })(ProgressDoneNotification = Proposed.ProgressDoneNotification || (Proposed.ProgressDoneNotification = {}));
-    let ProgressCancelNotification;
-    (function (ProgressCancelNotification) {
-        ProgressCancelNotification.type = progress.ProgressCancelNotification.type;
-    })(ProgressCancelNotification = Proposed.ProgressCancelNotification || (Proposed.ProgressCancelNotification = {}));
+    Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
+    Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
+    Proposed.SemanticTokens = st.SemanticTokens;
+    let SemanticTokensRequest;
+    (function (SemanticTokensRequest) {
+        SemanticTokensRequest.method = st.SemanticTokensRequest.method;
+        SemanticTokensRequest.type = st.SemanticTokensRequest.type;
+    })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
+    let SemanticTokensEditsRequest;
+    (function (SemanticTokensEditsRequest) {
+        SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
+        SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
+    })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
+    let SemanticTokensRangeRequest;
+    (function (SemanticTokensRangeRequest) {
+        SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
+        SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
+    })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
 })(Proposed = exports.Proposed || (exports.Proposed = {}));
-function createProtocolConnection(reader, writer, logger, strategy) {
-    return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
-}
-exports.createProtocolConnection = createProtocolConnection;
-
-
-/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-/// <reference path="./thenable.ts" />\r
-\r
-function __export(m) {\r
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r
-}\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const Is = __webpack_require__(6);\r
-const messages_1 = __webpack_require__(7);\r
-exports.RequestType = messages_1.RequestType;\r
-exports.RequestType0 = messages_1.RequestType0;\r
-exports.RequestType1 = messages_1.RequestType1;\r
-exports.RequestType2 = messages_1.RequestType2;\r
-exports.RequestType3 = messages_1.RequestType3;\r
-exports.RequestType4 = messages_1.RequestType4;\r
-exports.RequestType5 = messages_1.RequestType5;\r
-exports.RequestType6 = messages_1.RequestType6;\r
-exports.RequestType7 = messages_1.RequestType7;\r
-exports.RequestType8 = messages_1.RequestType8;\r
-exports.RequestType9 = messages_1.RequestType9;\r
-exports.ResponseError = messages_1.ResponseError;\r
-exports.ErrorCodes = messages_1.ErrorCodes;\r
-exports.NotificationType = messages_1.NotificationType;\r
-exports.NotificationType0 = messages_1.NotificationType0;\r
-exports.NotificationType1 = messages_1.NotificationType1;\r
-exports.NotificationType2 = messages_1.NotificationType2;\r
-exports.NotificationType3 = messages_1.NotificationType3;\r
-exports.NotificationType4 = messages_1.NotificationType4;\r
-exports.NotificationType5 = messages_1.NotificationType5;\r
-exports.NotificationType6 = messages_1.NotificationType6;\r
-exports.NotificationType7 = messages_1.NotificationType7;\r
-exports.NotificationType8 = messages_1.NotificationType8;\r
-exports.NotificationType9 = messages_1.NotificationType9;\r
-const messageReader_1 = __webpack_require__(8);\r
-exports.MessageReader = messageReader_1.MessageReader;\r
-exports.StreamMessageReader = messageReader_1.StreamMessageReader;\r
-exports.IPCMessageReader = messageReader_1.IPCMessageReader;\r
-exports.SocketMessageReader = messageReader_1.SocketMessageReader;\r
-const messageWriter_1 = __webpack_require__(10);\r
-exports.MessageWriter = messageWriter_1.MessageWriter;\r
-exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;\r
-exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;\r
-exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;\r
-const events_1 = __webpack_require__(9);\r
-exports.Disposable = events_1.Disposable;\r
-exports.Event = events_1.Event;\r
-exports.Emitter = events_1.Emitter;\r
-const cancellation_1 = __webpack_require__(11);\r
-exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;\r
-exports.CancellationToken = cancellation_1.CancellationToken;\r
-const linkedMap_1 = __webpack_require__(12);\r
-__export(__webpack_require__(13));\r
-__export(__webpack_require__(17));\r
-var CancelNotification;\r
-(function (CancelNotification) {\r
-    CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');\r
-})(CancelNotification || (CancelNotification = {}));\r
-exports.NullLogger = Object.freeze({\r
-    error: () => { },\r
-    warn: () => { },\r
-    info: () => { },\r
-    log: () => { }\r
-});\r
-var Trace;\r
-(function (Trace) {\r
-    Trace[Trace["Off"] = 0] = "Off";\r
-    Trace[Trace["Messages"] = 1] = "Messages";\r
-    Trace[Trace["Verbose"] = 2] = "Verbose";\r
-})(Trace = exports.Trace || (exports.Trace = {}));\r
-(function (Trace) {\r
-    function fromString(value) {\r
-        value = value.toLowerCase();\r
-        switch (value) {\r
-            case 'off':\r
-                return Trace.Off;\r
-            case 'messages':\r
-                return Trace.Messages;\r
-            case 'verbose':\r
-                return Trace.Verbose;\r
-            default:\r
-                return Trace.Off;\r
-        }\r
-    }\r
-    Trace.fromString = fromString;\r
-    function toString(value) {\r
-        switch (value) {\r
-            case Trace.Off:\r
-                return 'off';\r
-            case Trace.Messages:\r
-                return 'messages';\r
-            case Trace.Verbose:\r
-                return 'verbose';\r
-            default:\r
-                return 'off';\r
-        }\r
-    }\r
-    Trace.toString = toString;\r
-})(Trace = exports.Trace || (exports.Trace = {}));\r
-var TraceFormat;\r
-(function (TraceFormat) {\r
-    TraceFormat["Text"] = "text";\r
-    TraceFormat["JSON"] = "json";\r
-})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\r
-(function (TraceFormat) {\r
-    function fromString(value) {\r
-        value = value.toLowerCase();\r
-        if (value === 'json') {\r
-            return TraceFormat.JSON;\r
-        }\r
-        else {\r
-            return TraceFormat.Text;\r
-        }\r
-    }\r
-    TraceFormat.fromString = fromString;\r
-})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\r
-var SetTraceNotification;\r
-(function (SetTraceNotification) {\r
-    SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');\r
-})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));\r
-var LogTraceNotification;\r
-(function (LogTraceNotification) {\r
-    LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');\r
-})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));\r
-var ConnectionErrors;\r
-(function (ConnectionErrors) {\r
-    /**\r
-     * The connection is closed.\r
-     */\r
-    ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";\r
-    /**\r
-     * The connection got disposed.\r
-     */\r
-    ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";\r
-    /**\r
-     * The connection is already in listening mode.\r
-     */\r
-    ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";\r
-})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));\r
-class ConnectionError extends Error {\r
-    constructor(code, message) {\r
-        super(message);\r
-        this.code = code;\r
-        Object.setPrototypeOf(this, ConnectionError.prototype);\r
-    }\r
-}\r
-exports.ConnectionError = ConnectionError;\r
-var ConnectionStrategy;\r
-(function (ConnectionStrategy) {\r
-    function is(value) {\r
-        let candidate = value;\r
-        return candidate && Is.func(candidate.cancelUndispatched);\r
-    }\r
-    ConnectionStrategy.is = is;\r
-})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));\r
-var ConnectionState;\r
-(function (ConnectionState) {\r
-    ConnectionState[ConnectionState["New"] = 1] = "New";\r
-    ConnectionState[ConnectionState["Listening"] = 2] = "Listening";\r
-    ConnectionState[ConnectionState["Closed"] = 3] = "Closed";\r
-    ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";\r
-})(ConnectionState || (ConnectionState = {}));\r
-function _createMessageConnection(messageReader, messageWriter, logger, strategy) {\r
-    let sequenceNumber = 0;\r
-    let notificationSquenceNumber = 0;\r
-    let unknownResponseSquenceNumber = 0;\r
-    const version = '2.0';\r
-    let starRequestHandler = undefined;\r
-    let requestHandlers = Object.create(null);\r
-    let starNotificationHandler = undefined;\r
-    let notificationHandlers = Object.create(null);\r
-    let timer;\r
-    let messageQueue = new linkedMap_1.LinkedMap();\r
-    let responsePromises = Object.create(null);\r
-    let requestTokens = Object.create(null);\r
-    let trace = Trace.Off;\r
-    let traceFormat = TraceFormat.Text;\r
-    let tracer;\r
-    let state = ConnectionState.New;\r
-    let errorEmitter = new events_1.Emitter();\r
-    let closeEmitter = new events_1.Emitter();\r
-    let unhandledNotificationEmitter = new events_1.Emitter();\r
-    let disposeEmitter = new events_1.Emitter();\r
-    function createRequestQueueKey(id) {\r
-        return 'req-' + id.toString();\r
-    }\r
-    function createResponseQueueKey(id) {\r
-        if (id === null) {\r
-            return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();\r
-        }\r
-        else {\r
-            return 'res-' + id.toString();\r
-        }\r
-    }\r
-    function createNotificationQueueKey() {\r
-        return 'not-' + (++notificationSquenceNumber).toString();\r
-    }\r
-    function addMessageToQueue(queue, message) {\r
-        if (messages_1.isRequestMessage(message)) {\r
-            queue.set(createRequestQueueKey(message.id), message);\r
-        }\r
-        else if (messages_1.isResponseMessage(message)) {\r
-            queue.set(createResponseQueueKey(message.id), message);\r
-        }\r
-        else {\r
-            queue.set(createNotificationQueueKey(), message);\r
-        }\r
-    }\r
-    function cancelUndispatched(_message) {\r
-        return undefined;\r
-    }\r
-    function isListening() {\r
-        return state === ConnectionState.Listening;\r
-    }\r
-    function isClosed() {\r
-        return state === ConnectionState.Closed;\r
-    }\r
-    function isDisposed() {\r
-        return state === ConnectionState.Disposed;\r
-    }\r
-    function closeHandler() {\r
-        if (state === ConnectionState.New || state === ConnectionState.Listening) {\r
-            state = ConnectionState.Closed;\r
-            closeEmitter.fire(undefined);\r
-        }\r
-        // If the connection is disposed don't sent close events.\r
-    }\r
-    ;\r
-    function readErrorHandler(error) {\r
-        errorEmitter.fire([error, undefined, undefined]);\r
-    }\r
-    function writeErrorHandler(data) {\r
-        errorEmitter.fire(data);\r
-    }\r
-    messageReader.onClose(closeHandler);\r
-    messageReader.onError(readErrorHandler);\r
-    messageWriter.onClose(closeHandler);\r
-    messageWriter.onError(writeErrorHandler);\r
-    function triggerMessageQueue() {\r
-        if (timer || messageQueue.size === 0) {\r
-            return;\r
-        }\r
-        timer = setImmediate(() => {\r
-            timer = undefined;\r
-            processMessageQueue();\r
-        });\r
-    }\r
-    function processMessageQueue() {\r
-        if (messageQueue.size === 0) {\r
-            return;\r
-        }\r
-        let message = messageQueue.shift();\r
-        try {\r
-            if (messages_1.isRequestMessage(message)) {\r
-                handleRequest(message);\r
-            }\r
-            else if (messages_1.isNotificationMessage(message)) {\r
-                handleNotification(message);\r
-            }\r
-            else if (messages_1.isResponseMessage(message)) {\r
-                handleResponse(message);\r
-            }\r
-            else {\r
-                handleInvalidMessage(message);\r
-            }\r
-        }\r
-        finally {\r
-            triggerMessageQueue();\r
-        }\r
-    }\r
-    let callback = (message) => {\r
-        try {\r
-            // We have received a cancellation message. Check if the message is still in the queue\r
-            // and cancel it if allowed to do so.\r
-            if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {\r
-                let key = createRequestQueueKey(message.params.id);\r
-                let toCancel = messageQueue.get(key);\r
-                if (messages_1.isRequestMessage(toCancel)) {\r
-                    let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);\r
-                    if (response && (response.error !== void 0 || response.result !== void 0)) {\r
-                        messageQueue.delete(key);\r
-                        response.id = toCancel.id;\r
-                        traceSendingResponse(response, message.method, Date.now());\r
-                        messageWriter.write(response);\r
-                        return;\r
-                    }\r
-                }\r
-            }\r
-            addMessageToQueue(messageQueue, message);\r
-        }\r
-        finally {\r
-            triggerMessageQueue();\r
-        }\r
-    };\r
-    function handleRequest(requestMessage) {\r
-        if (isDisposed()) {\r
-            // we return here silently since we fired an event when the\r
-            // connection got disposed.\r
-            return;\r
-        }\r
-        function reply(resultOrError, method, startTime) {\r
-            let message = {\r
-                jsonrpc: version,\r
-                id: requestMessage.id\r
-            };\r
-            if (resultOrError instanceof messages_1.ResponseError) {\r
-                message.error = resultOrError.toJson();\r
-            }\r
-            else {\r
-                message.result = resultOrError === void 0 ? null : resultOrError;\r
-            }\r
-            traceSendingResponse(message, method, startTime);\r
-            messageWriter.write(message);\r
-        }\r
-        function replyError(error, method, startTime) {\r
-            let message = {\r
-                jsonrpc: version,\r
-                id: requestMessage.id,\r
-                error: error.toJson()\r
-            };\r
-            traceSendingResponse(message, method, startTime);\r
-            messageWriter.write(message);\r
-        }\r
-        function replySuccess(result, method, startTime) {\r
-            // The JSON RPC defines that a response must either have a result or an error\r
-            // So we can't treat undefined as a valid response result.\r
-            if (result === void 0) {\r
-                result = null;\r
-            }\r
-            let message = {\r
-                jsonrpc: version,\r
-                id: requestMessage.id,\r
-                result: result\r
-            };\r
-            traceSendingResponse(message, method, startTime);\r
-            messageWriter.write(message);\r
-        }\r
-        traceReceivedRequest(requestMessage);\r
-        let element = requestHandlers[requestMessage.method];\r
-        let type;\r
-        let requestHandler;\r
-        if (element) {\r
-            type = element.type;\r
-            requestHandler = element.handler;\r
-        }\r
-        let startTime = Date.now();\r
-        if (requestHandler || starRequestHandler) {\r
-            let cancellationSource = new cancellation_1.CancellationTokenSource();\r
-            let tokenKey = String(requestMessage.id);\r
-            requestTokens[tokenKey] = cancellationSource;\r
-            try {\r
-                let handlerResult;\r
-                if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r
-                    handlerResult = requestHandler\r
-                        ? requestHandler(cancellationSource.token)\r
-                        : starRequestHandler(requestMessage.method, cancellationSource.token);\r
-                }\r
-                else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {\r
-                    handlerResult = requestHandler\r
-                        ? requestHandler(...requestMessage.params, cancellationSource.token)\r
-                        : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);\r
-                }\r
-                else {\r
-                    handlerResult = requestHandler\r
-                        ? requestHandler(requestMessage.params, cancellationSource.token)\r
-                        : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);\r
-                }\r
-                let promise = handlerResult;\r
-                if (!handlerResult) {\r
-                    delete requestTokens[tokenKey];\r
-                    replySuccess(handlerResult, requestMessage.method, startTime);\r
-                }\r
-                else if (promise.then) {\r
-                    promise.then((resultOrError) => {\r
-                        delete requestTokens[tokenKey];\r
-                        reply(resultOrError, requestMessage.method, startTime);\r
-                    }, error => {\r
-                        delete requestTokens[tokenKey];\r
-                        if (error instanceof messages_1.ResponseError) {\r
-                            replyError(error, requestMessage.method, startTime);\r
-                        }\r
-                        else if (error && Is.string(error.message)) {\r
-                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\r
-                        }\r
-                        else {\r
-                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\r
-                        }\r
-                    });\r
-                }\r
-                else {\r
-                    delete requestTokens[tokenKey];\r
-                    reply(handlerResult, requestMessage.method, startTime);\r
-                }\r
-            }\r
-            catch (error) {\r
-                delete requestTokens[tokenKey];\r
-                if (error instanceof messages_1.ResponseError) {\r
-                    reply(error, requestMessage.method, startTime);\r
-                }\r
-                else if (error && Is.string(error.message)) {\r
-                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\r
-                }\r
-                else {\r
-                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\r
-                }\r
-            }\r
-        }\r
-        else {\r
-            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);\r
-        }\r
-    }\r
-    function handleResponse(responseMessage) {\r
-        if (isDisposed()) {\r
-            // See handle request.\r
-            return;\r
-        }\r
-        if (responseMessage.id === null) {\r
-            if (responseMessage.error) {\r
-                logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);\r
-            }\r
-            else {\r
-                logger.error(`Received response message without id. No further error information provided.`);\r
-            }\r
-        }\r
-        else {\r
-            let key = String(responseMessage.id);\r
-            let responsePromise = responsePromises[key];\r
-            traceReceivedResponse(responseMessage, responsePromise);\r
-            if (responsePromise) {\r
-                delete responsePromises[key];\r
-                try {\r
-                    if (responseMessage.error) {\r
-                        let error = responseMessage.error;\r
-                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\r
-                    }\r
-                    else if (responseMessage.result !== void 0) {\r
-                        responsePromise.resolve(responseMessage.result);\r
-                    }\r
-                    else {\r
-                        throw new Error('Should never happen.');\r
-                    }\r
-                }\r
-                catch (error) {\r
-                    if (error.message) {\r
-                        logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);\r
-                    }\r
-                    else {\r
-                        logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    }\r
-    function handleNotification(message) {\r
-        if (isDisposed()) {\r
-            // See handle request.\r
-            return;\r
-        }\r
-        let type = undefined;\r
-        let notificationHandler;\r
-        if (message.method === CancelNotification.type.method) {\r
-            notificationHandler = (params) => {\r
-                let id = params.id;\r
-                let source = requestTokens[String(id)];\r
-                if (source) {\r
-                    source.cancel();\r
-                }\r
-            };\r
-        }\r
-        else {\r
-            let element = notificationHandlers[message.method];\r
-            if (element) {\r
-                notificationHandler = element.handler;\r
-                type = element.type;\r
-            }\r
-        }\r
-        if (notificationHandler || starNotificationHandler) {\r
-            try {\r
-                traceReceivedNotification(message);\r
-                if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r
-                    notificationHandler ? notificationHandler() : starNotificationHandler(message.method);\r
-                }\r
-                else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {\r
-                    notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);\r
-                }\r
-                else {\r
-                    notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);\r
-                }\r
-            }\r
-            catch (error) {\r
-                if (error.message) {\r
-                    logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);\r
-                }\r
-                else {\r
-                    logger.error(`Notification handler '${message.method}' failed unexpectedly.`);\r
-                }\r
-            }\r
-        }\r
-        else {\r
-            unhandledNotificationEmitter.fire(message);\r
-        }\r
-    }\r
-    function handleInvalidMessage(message) {\r
-        if (!message) {\r
-            logger.error('Received empty message.');\r
-            return;\r
-        }\r
-        logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);\r
-        // Test whether we find an id to reject the promise\r
-        let responseMessage = message;\r
-        if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {\r
-            let key = String(responseMessage.id);\r
-            let responseHandler = responsePromises[key];\r
-            if (responseHandler) {\r
-                responseHandler.reject(new Error('The received response has neither a result nor an error property.'));\r
-            }\r
-        }\r
-    }\r
-    function traceSendingRequest(message) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose && message.params) {\r
-                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-            }\r
-            tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('send-request', message);\r
-        }\r
-    }\r
-    function traceSendingNotification(message) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.params) {\r
-                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    data = 'No parameters provided.\n\n';\r
-                }\r
-            }\r
-            tracer.log(`Sending notification '${message.method}'.`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('send-notification', message);\r
-        }\r
-    }\r
-    function traceSendingResponse(message, method, startTime) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.error && message.error.data) {\r
-                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    if (message.result) {\r
-                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;\r
-                    }\r
-                    else if (message.error === void 0) {\r
-                        data = 'No result returned.\n\n';\r
-                    }\r
-                }\r
-            }\r
-            tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('send-response', message);\r
-        }\r
-    }\r
-    function traceReceivedRequest(message) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose && message.params) {\r
-                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-            }\r
-            tracer.log(`Received request '${message.method} - (${message.id})'.`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('receive-request', message);\r
-        }\r
-    }\r
-    function traceReceivedNotification(message) {\r
-        if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.params) {\r
-                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    data = 'No parameters provided.\n\n';\r
-                }\r
-            }\r
-            tracer.log(`Received notification '${message.method}'.`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('receive-notification', message);\r
-        }\r
-    }\r
-    function traceReceivedResponse(message, responsePromise) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.error && message.error.data) {\r
-                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    if (message.result) {\r
-                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;\r
-                    }\r
-                    else if (message.error === void 0) {\r
-                        data = 'No result returned.\n\n';\r
-                    }\r
-                }\r
-            }\r
-            if (responsePromise) {\r
-                let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';\r
-                tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);\r
-            }\r
-            else {\r
-                tracer.log(`Received response ${message.id} without active response promise.`, data);\r
-            }\r
-        }\r
-        else {\r
-            logLSPMessage('receive-response', message);\r
-        }\r
-    }\r
-    function logLSPMessage(type, message) {\r
-        if (!tracer || trace === Trace.Off) {\r
-            return;\r
-        }\r
-        const lspMessage = {\r
-            isLSPMessage: true,\r
-            type,\r
-            message,\r
-            timestamp: Date.now()\r
-        };\r
-        tracer.log(lspMessage);\r
-    }\r
-    function throwIfClosedOrDisposed() {\r
-        if (isClosed()) {\r
-            throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');\r
-        }\r
-        if (isDisposed()) {\r
-            throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');\r
-        }\r
-    }\r
-    function throwIfListening() {\r
-        if (isListening()) {\r
-            throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');\r
-        }\r
-    }\r
-    function throwIfNotListening() {\r
-        if (!isListening()) {\r
-            throw new Error('Call listen() first.');\r
-        }\r
-    }\r
-    function undefinedToNull(param) {\r
-        if (param === void 0) {\r
-            return null;\r
-        }\r
-        else {\r
-            return param;\r
-        }\r
-    }\r
-    function computeMessageParams(type, params) {\r
-        let result;\r
-        let numberOfParams = type.numberOfParams;\r
-        switch (numberOfParams) {\r
-            case 0:\r
-                result = null;\r
-                break;\r
-            case 1:\r
-                result = undefinedToNull(params[0]);\r
-                break;\r
-            default:\r
-                result = [];\r
-                for (let i = 0; i < params.length && i < numberOfParams; i++) {\r
-                    result.push(undefinedToNull(params[i]));\r
-                }\r
-                if (params.length < numberOfParams) {\r
-                    for (let i = params.length; i < numberOfParams; i++) {\r
-                        result.push(null);\r
-                    }\r
-                }\r
-                break;\r
-        }\r
-        return result;\r
-    }\r
-    let connection = {\r
-        sendNotification: (type, ...params) => {\r
-            throwIfClosedOrDisposed();\r
-            let method;\r
-            let messageParams;\r
-            if (Is.string(type)) {\r
-                method = type;\r
-                switch (params.length) {\r
-                    case 0:\r
-                        messageParams = null;\r
-                        break;\r
-                    case 1:\r
-                        messageParams = params[0];\r
-                        break;\r
-                    default:\r
-                        messageParams = params;\r
-                        break;\r
-                }\r
-            }\r
-            else {\r
-                method = type.method;\r
-                messageParams = computeMessageParams(type, params);\r
-            }\r
-            let notificationMessage = {\r
-                jsonrpc: version,\r
-                method: method,\r
-                params: messageParams\r
-            };\r
-            traceSendingNotification(notificationMessage);\r
-            messageWriter.write(notificationMessage);\r
-        },\r
-        onNotification: (type, handler) => {\r
-            throwIfClosedOrDisposed();\r
-            if (Is.func(type)) {\r
-                starNotificationHandler = type;\r
-            }\r
-            else if (handler) {\r
-                if (Is.string(type)) {\r
-                    notificationHandlers[type] = { type: undefined, handler };\r
-                }\r
-                else {\r
-                    notificationHandlers[type.method] = { type, handler };\r
-                }\r
-            }\r
-        },\r
-        sendRequest: (type, ...params) => {\r
-            throwIfClosedOrDisposed();\r
-            throwIfNotListening();\r
-            let method;\r
-            let messageParams;\r
-            let token = undefined;\r
-            if (Is.string(type)) {\r
-                method = type;\r
-                switch (params.length) {\r
-                    case 0:\r
-                        messageParams = null;\r
-                        break;\r
-                    case 1:\r
-                        // The cancellation token is optional so it can also be undefined.\r
-                        if (cancellation_1.CancellationToken.is(params[0])) {\r
-                            messageParams = null;\r
-                            token = params[0];\r
-                        }\r
-                        else {\r
-                            messageParams = undefinedToNull(params[0]);\r
-                        }\r
-                        break;\r
-                    default:\r
-                        const last = params.length - 1;\r
-                        if (cancellation_1.CancellationToken.is(params[last])) {\r
-                            token = params[last];\r
-                            if (params.length === 2) {\r
-                                messageParams = undefinedToNull(params[0]);\r
-                            }\r
-                            else {\r
-                                messageParams = params.slice(0, last).map(value => undefinedToNull(value));\r
-                            }\r
-                        }\r
-                        else {\r
-                            messageParams = params.map(value => undefinedToNull(value));\r
-                        }\r
-                        break;\r
-                }\r
-            }\r
-            else {\r
-                method = type.method;\r
-                messageParams = computeMessageParams(type, params);\r
-                let numberOfParams = type.numberOfParams;\r
-                token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;\r
-            }\r
-            let id = sequenceNumber++;\r
-            let result = new Promise((resolve, reject) => {\r
-                let requestMessage = {\r
-                    jsonrpc: version,\r
-                    id: id,\r
-                    method: method,\r
-                    params: messageParams\r
-                };\r
-                let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };\r
-                traceSendingRequest(requestMessage);\r
-                try {\r
-                    messageWriter.write(requestMessage);\r
-                }\r
-                catch (e) {\r
-                    // Writing the message failed. So we need to reject the promise.\r
-                    responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));\r
-                    responsePromise = null;\r
-                }\r
-                if (responsePromise) {\r
-                    responsePromises[String(id)] = responsePromise;\r
-                }\r
-            });\r
-            if (token) {\r
-                token.onCancellationRequested(() => {\r
-                    connection.sendNotification(CancelNotification.type, { id });\r
-                });\r
-            }\r
-            return result;\r
-        },\r
-        onRequest: (type, handler) => {\r
-            throwIfClosedOrDisposed();\r
-            if (Is.func(type)) {\r
-                starRequestHandler = type;\r
-            }\r
-            else if (handler) {\r
-                if (Is.string(type)) {\r
-                    requestHandlers[type] = { type: undefined, handler };\r
-                }\r
-                else {\r
-                    requestHandlers[type.method] = { type, handler };\r
-                }\r
-            }\r
-        },\r
-        trace: (_value, _tracer, sendNotificationOrTraceOptions) => {\r
-            let _sendNotification = false;\r
-            let _traceFormat = TraceFormat.Text;\r
-            if (sendNotificationOrTraceOptions !== void 0) {\r
-                if (Is.boolean(sendNotificationOrTraceOptions)) {\r
-                    _sendNotification = sendNotificationOrTraceOptions;\r
-                }\r
-                else {\r
-                    _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;\r
-                    _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;\r
-                }\r
-            }\r
-            trace = _value;\r
-            traceFormat = _traceFormat;\r
-            if (trace === Trace.Off) {\r
-                tracer = undefined;\r
-            }\r
-            else {\r
-                tracer = _tracer;\r
-            }\r
-            if (_sendNotification && !isClosed() && !isDisposed()) {\r
-                connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });\r
-            }\r
-        },\r
-        onError: errorEmitter.event,\r
-        onClose: closeEmitter.event,\r
-        onUnhandledNotification: unhandledNotificationEmitter.event,\r
-        onDispose: disposeEmitter.event,\r
-        dispose: () => {\r
-            if (isDisposed()) {\r
-                return;\r
-            }\r
-            state = ConnectionState.Disposed;\r
-            disposeEmitter.fire(undefined);\r
-            let error = new Error('Connection got disposed.');\r
-            Object.keys(responsePromises).forEach((key) => {\r
-                responsePromises[key].reject(error);\r
-            });\r
-            responsePromises = Object.create(null);\r
-            requestTokens = Object.create(null);\r
-            messageQueue = new linkedMap_1.LinkedMap();\r
-            // Test for backwards compatibility\r
-            if (Is.func(messageWriter.dispose)) {\r
-                messageWriter.dispose();\r
-            }\r
-            if (Is.func(messageReader.dispose)) {\r
-                messageReader.dispose();\r
-            }\r
-        },\r
-        listen: () => {\r
-            throwIfClosedOrDisposed();\r
-            throwIfListening();\r
-            state = ConnectionState.Listening;\r
-            messageReader.listen(callback);\r
-        },\r
-        inspect: () => {\r
-            console.log("inspect");\r
-        }\r
-    };\r
-    connection.onNotification(LogTraceNotification.type, (params) => {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);\r
-    });\r
-    return connection;\r
-}\r
-function isMessageReader(value) {\r
-    return value.listen !== void 0 && value.read === void 0;\r
-}\r
-function isMessageWriter(value) {\r
-    return value.write !== void 0 && value.end === void 0;\r
-}\r
-function createMessageConnection(input, output, logger, strategy) {\r
-    if (!logger) {\r
-        logger = exports.NullLogger;\r
-    }\r
-    let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);\r
-    let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);\r
-    return _createMessageConnection(reader, writer, logger, strategy);\r
-}\r
-exports.createMessageConnection = createMessageConnection;\r
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-function boolean(value) {\r
-    return value === true || value === false;\r
-}\r
-exports.boolean = boolean;\r
-function string(value) {\r
-    return typeof value === 'string' || value instanceof String;\r
-}\r
-exports.string = string;\r
-function number(value) {\r
-    return typeof value === 'number' || value instanceof Number;\r
-}\r
-exports.number = number;\r
-function error(value) {\r
-    return value instanceof Error;\r
-}\r
-exports.error = error;\r
-function func(value) {\r
-    return typeof value === 'function';\r
-}\r
-exports.func = func;\r
-function array(value) {\r
-    return Array.isArray(value);\r
-}\r
-exports.array = array;\r
-function stringArray(value) {\r
-    return array(value) && value.every(elem => string(elem));\r
-}\r
-exports.stringArray = stringArray;\r
-
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const is = __webpack_require__(6);\r
-/**\r
- * Predefined error codes.\r
- */\r
-var ErrorCodes;\r
-(function (ErrorCodes) {\r
-    // Defined by JSON RPC\r
-    ErrorCodes.ParseError = -32700;\r
-    ErrorCodes.InvalidRequest = -32600;\r
-    ErrorCodes.MethodNotFound = -32601;\r
-    ErrorCodes.InvalidParams = -32602;\r
-    ErrorCodes.InternalError = -32603;\r
-    ErrorCodes.serverErrorStart = -32099;\r
-    ErrorCodes.serverErrorEnd = -32000;\r
-    ErrorCodes.ServerNotInitialized = -32002;\r
-    ErrorCodes.UnknownErrorCode = -32001;\r
-    // Defined by the protocol.\r
-    ErrorCodes.RequestCancelled = -32800;\r
-    ErrorCodes.ContentModified = -32801;\r
-    // Defined by VSCode library.\r
-    ErrorCodes.MessageWriteError = 1;\r
-    ErrorCodes.MessageReadError = 2;\r
-})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));\r
-/**\r
- * An error object return in a response in case a request\r
- * has failed.\r
- */\r
-class ResponseError extends Error {\r
-    constructor(code, message, data) {\r
-        super(message);\r
-        this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;\r
-        this.data = data;\r
-        Object.setPrototypeOf(this, ResponseError.prototype);\r
-    }\r
-    toJson() {\r
-        return {\r
-            code: this.code,\r
-            message: this.message,\r
-            data: this.data,\r
-        };\r
-    }\r
-}\r
-exports.ResponseError = ResponseError;\r
-/**\r
- * An abstract implementation of a MessageType.\r
- */\r
-class AbstractMessageType {\r
-    constructor(_method, _numberOfParams) {\r
-        this._method = _method;\r
-        this._numberOfParams = _numberOfParams;\r
-    }\r
-    get method() {\r
-        return this._method;\r
-    }\r
-    get numberOfParams() {\r
-        return this._numberOfParams;\r
-    }\r
-}\r
-exports.AbstractMessageType = AbstractMessageType;\r
-/**\r
- * Classes to type request response pairs\r
- */\r
-class RequestType0 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 0);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType0 = RequestType0;\r
-class RequestType extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType = RequestType;\r
-class RequestType1 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType1 = RequestType1;\r
-class RequestType2 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 2);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType2 = RequestType2;\r
-class RequestType3 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 3);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType3 = RequestType3;\r
-class RequestType4 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 4);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType4 = RequestType4;\r
-class RequestType5 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 5);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType5 = RequestType5;\r
-class RequestType6 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 6);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType6 = RequestType6;\r
-class RequestType7 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 7);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType7 = RequestType7;\r
-class RequestType8 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 8);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType8 = RequestType8;\r
-class RequestType9 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 9);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType9 = RequestType9;\r
-class NotificationType extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType = NotificationType;\r
-class NotificationType0 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 0);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType0 = NotificationType0;\r
-class NotificationType1 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType1 = NotificationType1;\r
-class NotificationType2 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 2);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType2 = NotificationType2;\r
-class NotificationType3 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 3);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType3 = NotificationType3;\r
-class NotificationType4 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 4);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType4 = NotificationType4;\r
-class NotificationType5 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 5);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType5 = NotificationType5;\r
-class NotificationType6 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 6);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType6 = NotificationType6;\r
-class NotificationType7 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 7);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType7 = NotificationType7;\r
-class NotificationType8 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 8);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType8 = NotificationType8;\r
-class NotificationType9 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 9);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType9 = NotificationType9;\r
-/**\r
- * Tests if the given message is a request message\r
- */\r
-function isRequestMessage(message) {\r
-    let candidate = message;\r
-    return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));\r
-}\r
-exports.isRequestMessage = isRequestMessage;\r
-/**\r
- * Tests if the given message is a notification message\r
- */\r
-function isNotificationMessage(message) {\r
-    let candidate = message;\r
-    return candidate && is.string(candidate.method) && message.id === void 0;\r
-}\r
-exports.isNotificationMessage = isNotificationMessage;\r
-/**\r
- * Tests if the given message is a response message\r
- */\r
-function isResponseMessage(message) {\r
-    let candidate = message;\r
-    return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);\r
-}\r
-exports.isResponseMessage = isResponseMessage;\r
-
-
-/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const events_1 = __webpack_require__(9);\r
-const Is = __webpack_require__(6);\r
-let DefaultSize = 8192;\r
-let CR = Buffer.from('\r', 'ascii')[0];\r
-let LF = Buffer.from('\n', 'ascii')[0];\r
-let CRLF = '\r\n';\r
-class MessageBuffer {\r
-    constructor(encoding = 'utf8') {\r
-        this.encoding = encoding;\r
-        this.index = 0;\r
-        this.buffer = Buffer.allocUnsafe(DefaultSize);\r
-    }\r
-    append(chunk) {\r
-        var toAppend = chunk;\r
-        if (typeof (chunk) === 'string') {\r
-            var str = chunk;\r
-            var bufferLen = Buffer.byteLength(str, this.encoding);\r
-            toAppend = Buffer.allocUnsafe(bufferLen);\r
-            toAppend.write(str, 0, bufferLen, this.encoding);\r
-        }\r
-        if (this.buffer.length - this.index >= toAppend.length) {\r
-            toAppend.copy(this.buffer, this.index, 0, toAppend.length);\r
-        }\r
-        else {\r
-            var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;\r
-            if (this.index === 0) {\r
-                this.buffer = Buffer.allocUnsafe(newSize);\r
-                toAppend.copy(this.buffer, 0, 0, toAppend.length);\r
-            }\r
-            else {\r
-                this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);\r
-            }\r
-        }\r
-        this.index += toAppend.length;\r
-    }\r
-    tryReadHeaders() {\r
-        let result = undefined;\r
-        let current = 0;\r
-        while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {\r
-            current++;\r
-        }\r
-        // No header / body separator found (e.g CRLFCRLF)\r
-        if (current + 3 >= this.index) {\r
-            return result;\r
-        }\r
-        result = Object.create(null);\r
-        let headers = this.buffer.toString('ascii', 0, current).split(CRLF);\r
-        headers.forEach((header) => {\r
-            let index = header.indexOf(':');\r
-            if (index === -1) {\r
-                throw new Error('Message header must separate key and value using :');\r
-            }\r
-            let key = header.substr(0, index);\r
-            let value = header.substr(index + 1).trim();\r
-            result[key] = value;\r
-        });\r
-        let nextStart = current + 4;\r
-        this.buffer = this.buffer.slice(nextStart);\r
-        this.index = this.index - nextStart;\r
-        return result;\r
-    }\r
-    tryReadContent(length) {\r
-        if (this.index < length) {\r
-            return null;\r
-        }\r
-        let result = this.buffer.toString(this.encoding, 0, length);\r
-        let nextStart = length;\r
-        this.buffer.copy(this.buffer, 0, nextStart);\r
-        this.index = this.index - nextStart;\r
-        return result;\r
-    }\r
-    get numberOfBytes() {\r
-        return this.index;\r
-    }\r
-}\r
-var MessageReader;\r
-(function (MessageReader) {\r
-    function is(value) {\r
-        let candidate = value;\r
-        return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&\r
-            Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);\r
-    }\r
-    MessageReader.is = is;\r
-})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));\r
-class AbstractMessageReader {\r
-    constructor() {\r
-        this.errorEmitter = new events_1.Emitter();\r
-        this.closeEmitter = new events_1.Emitter();\r
-        this.partialMessageEmitter = new events_1.Emitter();\r
-    }\r
-    dispose() {\r
-        this.errorEmitter.dispose();\r
-        this.closeEmitter.dispose();\r
-    }\r
-    get onError() {\r
-        return this.errorEmitter.event;\r
-    }\r
-    fireError(error) {\r
-        this.errorEmitter.fire(this.asError(error));\r
-    }\r
-    get onClose() {\r
-        return this.closeEmitter.event;\r
-    }\r
-    fireClose() {\r
-        this.closeEmitter.fire(undefined);\r
-    }\r
-    get onPartialMessage() {\r
-        return this.partialMessageEmitter.event;\r
-    }\r
-    firePartialMessage(info) {\r
-        this.partialMessageEmitter.fire(info);\r
-    }\r
-    asError(error) {\r
-        if (error instanceof Error) {\r
-            return error;\r
-        }\r
-        else {\r
-            return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\r
-        }\r
-    }\r
-}\r
-exports.AbstractMessageReader = AbstractMessageReader;\r
-class StreamMessageReader extends AbstractMessageReader {\r
-    constructor(readable, encoding = 'utf8') {\r
-        super();\r
-        this.readable = readable;\r
-        this.buffer = new MessageBuffer(encoding);\r
-        this._partialMessageTimeout = 10000;\r
-    }\r
-    set partialMessageTimeout(timeout) {\r
-        this._partialMessageTimeout = timeout;\r
-    }\r
-    get partialMessageTimeout() {\r
-        return this._partialMessageTimeout;\r
-    }\r
-    listen(callback) {\r
-        this.nextMessageLength = -1;\r
-        this.messageToken = 0;\r
-        this.partialMessageTimer = undefined;\r
-        this.callback = callback;\r
-        this.readable.on('data', (data) => {\r
-            this.onData(data);\r
-        });\r
-        this.readable.on('error', (error) => this.fireError(error));\r
-        this.readable.on('close', () => this.fireClose());\r
-    }\r
-    onData(data) {\r
-        this.buffer.append(data);\r
-        while (true) {\r
-            if (this.nextMessageLength === -1) {\r
-                let headers = this.buffer.tryReadHeaders();\r
-                if (!headers) {\r
-                    return;\r
-                }\r
-                let contentLength = headers['Content-Length'];\r
-                if (!contentLength) {\r
-                    throw new Error('Header must provide a Content-Length property.');\r
-                }\r
-                let length = parseInt(contentLength);\r
-                if (isNaN(length)) {\r
-                    throw new Error('Content-Length value must be a number.');\r
-                }\r
-                this.nextMessageLength = length;\r
-                // Take the encoding form the header. For compatibility\r
-                // treat both utf-8 and utf8 as node utf8\r
-            }\r
-            var msg = this.buffer.tryReadContent(this.nextMessageLength);\r
-            if (msg === null) {\r
-                /** We haven't received the full message yet. */\r
-                this.setPartialMessageTimer();\r
-                return;\r
-            }\r
-            this.clearPartialMessageTimer();\r
-            this.nextMessageLength = -1;\r
-            this.messageToken++;\r
-            var json = JSON.parse(msg);\r
-            this.callback(json);\r
-        }\r
-    }\r
-    clearPartialMessageTimer() {\r
-        if (this.partialMessageTimer) {\r
-            clearTimeout(this.partialMessageTimer);\r
-            this.partialMessageTimer = undefined;\r
-        }\r
-    }\r
-    setPartialMessageTimer() {\r
-        this.clearPartialMessageTimer();\r
-        if (this._partialMessageTimeout <= 0) {\r
-            return;\r
-        }\r
-        this.partialMessageTimer = setTimeout((token, timeout) => {\r
-            this.partialMessageTimer = undefined;\r
-            if (token === this.messageToken) {\r
-                this.firePartialMessage({ messageToken: token, waitingTime: timeout });\r
-                this.setPartialMessageTimer();\r
-            }\r
-        }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);\r
-    }\r
-}\r
-exports.StreamMessageReader = StreamMessageReader;\r
-class IPCMessageReader extends AbstractMessageReader {\r
-    constructor(process) {\r
-        super();\r
-        this.process = process;\r
-        let eventEmitter = this.process;\r
-        eventEmitter.on('error', (error) => this.fireError(error));\r
-        eventEmitter.on('close', () => this.fireClose());\r
-    }\r
-    listen(callback) {\r
-        this.process.on('message', callback);\r
-    }\r
-}\r
-exports.IPCMessageReader = IPCMessageReader;\r
-class SocketMessageReader extends StreamMessageReader {\r
-    constructor(socket, encoding = 'utf-8') {\r
-        super(socket, encoding);\r
-    }\r
-}\r
-exports.SocketMessageReader = SocketMessageReader;\r
-
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-var Disposable;\r
-(function (Disposable) {\r
-    function create(func) {\r
-        return {\r
-            dispose: func\r
-        };\r
-    }\r
-    Disposable.create = create;\r
-})(Disposable = exports.Disposable || (exports.Disposable = {}));\r
-var Event;\r
-(function (Event) {\r
-    const _disposable = { dispose() { } };\r
-    Event.None = function () { return _disposable; };\r
-})(Event = exports.Event || (exports.Event = {}));\r
-class CallbackList {\r
-    add(callback, context = null, bucket) {\r
-        if (!this._callbacks) {\r
-            this._callbacks = [];\r
-            this._contexts = [];\r
-        }\r
-        this._callbacks.push(callback);\r
-        this._contexts.push(context);\r
-        if (Array.isArray(bucket)) {\r
-            bucket.push({ dispose: () => this.remove(callback, context) });\r
-        }\r
-    }\r
-    remove(callback, context = null) {\r
-        if (!this._callbacks) {\r
-            return;\r
-        }\r
-        var foundCallbackWithDifferentContext = false;\r
-        for (var i = 0, len = this._callbacks.length; i < len; i++) {\r
-            if (this._callbacks[i] === callback) {\r
-                if (this._contexts[i] === context) {\r
-                    // callback & context match => remove it\r
-                    this._callbacks.splice(i, 1);\r
-                    this._contexts.splice(i, 1);\r
-                    return;\r
-                }\r
-                else {\r
-                    foundCallbackWithDifferentContext = true;\r
-                }\r
-            }\r
-        }\r
-        if (foundCallbackWithDifferentContext) {\r
-            throw new Error('When adding a listener with a context, you should remove it with the same context');\r
-        }\r
-    }\r
-    invoke(...args) {\r
-        if (!this._callbacks) {\r
-            return [];\r
-        }\r
-        var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);\r
-        for (var i = 0, len = callbacks.length; i < len; i++) {\r
-            try {\r
-                ret.push(callbacks[i].apply(contexts[i], args));\r
-            }\r
-            catch (e) {\r
-                console.error(e);\r
-            }\r
-        }\r
-        return ret;\r
-    }\r
-    isEmpty() {\r
-        return !this._callbacks || this._callbacks.length === 0;\r
-    }\r
-    dispose() {\r
-        this._callbacks = undefined;\r
-        this._contexts = undefined;\r
-    }\r
-}\r
-class Emitter {\r
-    constructor(_options) {\r
-        this._options = _options;\r
-    }\r
-    /**\r
-     * For the public to allow to subscribe\r
-     * to events from this Emitter\r
-     */\r
-    get event() {\r
-        if (!this._event) {\r
-            this._event = (listener, thisArgs, disposables) => {\r
-                if (!this._callbacks) {\r
-                    this._callbacks = new CallbackList();\r
-                }\r
-                if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {\r
-                    this._options.onFirstListenerAdd(this);\r
-                }\r
-                this._callbacks.add(listener, thisArgs);\r
-                let result;\r
-                result = {\r
-                    dispose: () => {\r
-                        this._callbacks.remove(listener, thisArgs);\r
-                        result.dispose = Emitter._noop;\r
-                        if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {\r
-                            this._options.onLastListenerRemove(this);\r
-                        }\r
-                    }\r
-                };\r
-                if (Array.isArray(disposables)) {\r
-                    disposables.push(result);\r
-                }\r
-                return result;\r
-            };\r
-        }\r
-        return this._event;\r
-    }\r
-    /**\r
-     * To be kept private to fire an event to\r
-     * subscribers\r
-     */\r
-    fire(event) {\r
-        if (this._callbacks) {\r
-            this._callbacks.invoke.call(this._callbacks, event);\r
-        }\r
-    }\r
-    dispose() {\r
-        if (this._callbacks) {\r
-            this._callbacks.dispose();\r
-            this._callbacks = undefined;\r
-        }\r
-    }\r
-}\r
-Emitter._noop = function () { };\r
-exports.Emitter = Emitter;\r
-
-
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const events_1 = __webpack_require__(9);\r
-const Is = __webpack_require__(6);\r
-let ContentLength = 'Content-Length: ';\r
-let CRLF = '\r\n';\r
-var MessageWriter;\r
-(function (MessageWriter) {\r
-    function is(value) {\r
-        let candidate = value;\r
-        return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&\r
-            Is.func(candidate.onError) && Is.func(candidate.write);\r
-    }\r
-    MessageWriter.is = is;\r
-})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));\r
-class AbstractMessageWriter {\r
-    constructor() {\r
-        this.errorEmitter = new events_1.Emitter();\r
-        this.closeEmitter = new events_1.Emitter();\r
-    }\r
-    dispose() {\r
-        this.errorEmitter.dispose();\r
-        this.closeEmitter.dispose();\r
-    }\r
-    get onError() {\r
-        return this.errorEmitter.event;\r
-    }\r
-    fireError(error, message, count) {\r
-        this.errorEmitter.fire([this.asError(error), message, count]);\r
-    }\r
-    get onClose() {\r
-        return this.closeEmitter.event;\r
-    }\r
-    fireClose() {\r
-        this.closeEmitter.fire(undefined);\r
-    }\r
-    asError(error) {\r
-        if (error instanceof Error) {\r
-            return error;\r
-        }\r
-        else {\r
-            return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\r
-        }\r
-    }\r
-}\r
-exports.AbstractMessageWriter = AbstractMessageWriter;\r
-class StreamMessageWriter extends AbstractMessageWriter {\r
-    constructor(writable, encoding = 'utf8') {\r
-        super();\r
-        this.writable = writable;\r
-        this.encoding = encoding;\r
-        this.errorCount = 0;\r
-        this.writable.on('error', (error) => this.fireError(error));\r
-        this.writable.on('close', () => this.fireClose());\r
-    }\r
-    write(msg) {\r
-        let json = JSON.stringify(msg);\r
-        let contentLength = Buffer.byteLength(json, this.encoding);\r
-        let headers = [\r
-            ContentLength, contentLength.toString(), CRLF,\r
-            CRLF\r
-        ];\r
-        try {\r
-            // Header must be written in ASCII encoding\r
-            this.writable.write(headers.join(''), 'ascii');\r
-            // Now write the content. This can be written in any encoding\r
-            this.writable.write(json, this.encoding);\r
-            this.errorCount = 0;\r
-        }\r
-        catch (error) {\r
-            this.errorCount++;\r
-            this.fireError(error, msg, this.errorCount);\r
-        }\r
-    }\r
-}\r
-exports.StreamMessageWriter = StreamMessageWriter;\r
-class IPCMessageWriter extends AbstractMessageWriter {\r
-    constructor(process) {\r
-        super();\r
-        this.process = process;\r
-        this.errorCount = 0;\r
-        this.queue = [];\r
-        this.sending = false;\r
-        let eventEmitter = this.process;\r
-        eventEmitter.on('error', (error) => this.fireError(error));\r
-        eventEmitter.on('close', () => this.fireClose);\r
-    }\r
-    write(msg) {\r
-        if (!this.sending && this.queue.length === 0) {\r
-            // See https://github.com/nodejs/node/issues/7657\r
-            this.doWriteMessage(msg);\r
-        }\r
-        else {\r
-            this.queue.push(msg);\r
-        }\r
-    }\r
-    doWriteMessage(msg) {\r
-        try {\r
-            if (this.process.send) {\r
-                this.sending = true;\r
-                this.process.send(msg, undefined, undefined, (error) => {\r
-                    this.sending = false;\r
-                    if (error) {\r
-                        this.errorCount++;\r
-                        this.fireError(error, msg, this.errorCount);\r
-                    }\r
-                    else {\r
-                        this.errorCount = 0;\r
-                    }\r
-                    if (this.queue.length > 0) {\r
-                        this.doWriteMessage(this.queue.shift());\r
-                    }\r
-                });\r
-            }\r
-        }\r
-        catch (error) {\r
-            this.errorCount++;\r
-            this.fireError(error, msg, this.errorCount);\r
-        }\r
-    }\r
-}\r
-exports.IPCMessageWriter = IPCMessageWriter;\r
-class SocketMessageWriter extends AbstractMessageWriter {\r
-    constructor(socket, encoding = 'utf8') {\r
-        super();\r
-        this.socket = socket;\r
-        this.queue = [];\r
-        this.sending = false;\r
-        this.encoding = encoding;\r
-        this.errorCount = 0;\r
-        this.socket.on('error', (error) => this.fireError(error));\r
-        this.socket.on('close', () => this.fireClose());\r
-    }\r
-    dispose() {\r
-        super.dispose();\r
-        this.socket.destroy();\r
-    }\r
-    write(msg) {\r
-        if (!this.sending && this.queue.length === 0) {\r
-            // See https://github.com/nodejs/node/issues/7657\r
-            this.doWriteMessage(msg);\r
-        }\r
-        else {\r
-            this.queue.push(msg);\r
-        }\r
-    }\r
-    doWriteMessage(msg) {\r
-        let json = JSON.stringify(msg);\r
-        let contentLength = Buffer.byteLength(json, this.encoding);\r
-        let headers = [\r
-            ContentLength, contentLength.toString(), CRLF,\r
-            CRLF\r
-        ];\r
-        try {\r
-            // Header must be written in ASCII encoding\r
-            this.sending = true;\r
-            this.socket.write(headers.join(''), 'ascii', (error) => {\r
-                if (error) {\r
-                    this.handleError(error, msg);\r
-                }\r
-                try {\r
-                    // Now write the content. This can be written in any encoding\r
-                    this.socket.write(json, this.encoding, (error) => {\r
-                        this.sending = false;\r
-                        if (error) {\r
-                            this.handleError(error, msg);\r
-                        }\r
-                        else {\r
-                            this.errorCount = 0;\r
-                        }\r
-                        if (this.queue.length > 0) {\r
-                            this.doWriteMessage(this.queue.shift());\r
-                        }\r
-                    });\r
-                }\r
-                catch (error) {\r
-                    this.handleError(error, msg);\r
-                }\r
-            });\r
-        }\r
-        catch (error) {\r
-            this.handleError(error, msg);\r
-        }\r
-    }\r
-    handleError(error, msg) {\r
-        this.errorCount++;\r
-        this.fireError(error, msg, this.errorCount);\r
-    }\r
-}\r
-exports.SocketMessageWriter = SocketMessageWriter;\r
-
-
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/*---------------------------------------------------------------------------------------------\r
- *  Copyright (c) Microsoft Corporation. All rights reserved.\r
- *  Licensed under the MIT License. See License.txt in the project root for license information.\r
- *--------------------------------------------------------------------------------------------*/\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const events_1 = __webpack_require__(9);\r
-const Is = __webpack_require__(6);\r
-var CancellationToken;\r
-(function (CancellationToken) {\r
-    CancellationToken.None = Object.freeze({\r
-        isCancellationRequested: false,\r
-        onCancellationRequested: events_1.Event.None\r
-    });\r
-    CancellationToken.Cancelled = Object.freeze({\r
-        isCancellationRequested: true,\r
-        onCancellationRequested: events_1.Event.None\r
-    });\r
-    function is(value) {\r
-        let candidate = value;\r
-        return candidate && (candidate === CancellationToken.None\r
-            || candidate === CancellationToken.Cancelled\r
-            || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));\r
-    }\r
-    CancellationToken.is = is;\r
-})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));\r
-const shortcutEvent = Object.freeze(function (callback, context) {\r
-    let handle = setTimeout(callback.bind(context), 0);\r
-    return { dispose() { clearTimeout(handle); } };\r
-});\r
-class MutableToken {\r
-    constructor() {\r
-        this._isCancelled = false;\r
-    }\r
-    cancel() {\r
-        if (!this._isCancelled) {\r
-            this._isCancelled = true;\r
-            if (this._emitter) {\r
-                this._emitter.fire(undefined);\r
-                this.dispose();\r
-            }\r
-        }\r
-    }\r
-    get isCancellationRequested() {\r
-        return this._isCancelled;\r
-    }\r
-    get onCancellationRequested() {\r
-        if (this._isCancelled) {\r
-            return shortcutEvent;\r
-        }\r
-        if (!this._emitter) {\r
-            this._emitter = new events_1.Emitter();\r
-        }\r
-        return this._emitter.event;\r
-    }\r
-    dispose() {\r
-        if (this._emitter) {\r
-            this._emitter.dispose();\r
-            this._emitter = undefined;\r
-        }\r
-    }\r
-}\r
-class CancellationTokenSource {\r
-    get token() {\r
-        if (!this._token) {\r
-            // be lazy and create the token only when\r
-            // actually needed\r
-            this._token = new MutableToken();\r
-        }\r
-        return this._token;\r
-    }\r
-    cancel() {\r
-        if (!this._token) {\r
-            // save an object by returning the default\r
-            // cancelled token when cancellation happens\r
-            // before someone asks for the token\r
-            this._token = CancellationToken.Cancelled;\r
-        }\r
-        else {\r
-            this._token.cancel();\r
-        }\r
-    }\r
-    dispose() {\r
-        if (!this._token) {\r
-            // ensure to initialize with an empty token if we had none\r
-            this._token = CancellationToken.None;\r
-        }\r
-        else if (this._token instanceof MutableToken) {\r
-            // actually dispose\r
-            this._token.dispose();\r
-        }\r
-    }\r
-}\r
-exports.CancellationTokenSource = CancellationTokenSource;\r
-
-
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-\r
-/*---------------------------------------------------------------------------------------------\r
- *  Copyright (c) Microsoft Corporation. All rights reserved.\r
- *  Licensed under the MIT License. See License.txt in the project root for license information.\r
- *--------------------------------------------------------------------------------------------*/\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-var Touch;\r
-(function (Touch) {\r
-    Touch.None = 0;\r
-    Touch.First = 1;\r
-    Touch.Last = 2;\r
-})(Touch = exports.Touch || (exports.Touch = {}));\r
-class LinkedMap {\r
-    constructor() {\r
-        this._map = new Map();\r
-        this._head = undefined;\r
-        this._tail = undefined;\r
-        this._size = 0;\r
-    }\r
-    clear() {\r
-        this._map.clear();\r
-        this._head = undefined;\r
-        this._tail = undefined;\r
-        this._size = 0;\r
-    }\r
-    isEmpty() {\r
-        return !this._head && !this._tail;\r
-    }\r
-    get size() {\r
-        return this._size;\r
-    }\r
-    has(key) {\r
-        return this._map.has(key);\r
-    }\r
-    get(key) {\r
-        const item = this._map.get(key);\r
-        if (!item) {\r
-            return undefined;\r
-        }\r
-        return item.value;\r
-    }\r
-    set(key, value, touch = Touch.None) {\r
-        let item = this._map.get(key);\r
-        if (item) {\r
-            item.value = value;\r
-            if (touch !== Touch.None) {\r
-                this.touch(item, touch);\r
-            }\r
-        }\r
-        else {\r
-            item = { key, value, next: undefined, previous: undefined };\r
-            switch (touch) {\r
-                case Touch.None:\r
-                    this.addItemLast(item);\r
-                    break;\r
-                case Touch.First:\r
-                    this.addItemFirst(item);\r
-                    break;\r
-                case Touch.Last:\r
-                    this.addItemLast(item);\r
-                    break;\r
-                default:\r
-                    this.addItemLast(item);\r
-                    break;\r
-            }\r
-            this._map.set(key, item);\r
-            this._size++;\r
-        }\r
-    }\r
-    delete(key) {\r
-        const item = this._map.get(key);\r
-        if (!item) {\r
-            return false;\r
-        }\r
-        this._map.delete(key);\r
-        this.removeItem(item);\r
-        this._size--;\r
-        return true;\r
-    }\r
-    shift() {\r
-        if (!this._head && !this._tail) {\r
-            return undefined;\r
-        }\r
-        if (!this._head || !this._tail) {\r
-            throw new Error('Invalid list');\r
-        }\r
-        const item = this._head;\r
-        this._map.delete(item.key);\r
-        this.removeItem(item);\r
-        this._size--;\r
-        return item.value;\r
-    }\r
-    forEach(callbackfn, thisArg) {\r
-        let current = this._head;\r
-        while (current) {\r
-            if (thisArg) {\r
-                callbackfn.bind(thisArg)(current.value, current.key, this);\r
-            }\r
-            else {\r
-                callbackfn(current.value, current.key, this);\r
-            }\r
-            current = current.next;\r
-        }\r
-    }\r
-    forEachReverse(callbackfn, thisArg) {\r
-        let current = this._tail;\r
-        while (current) {\r
-            if (thisArg) {\r
-                callbackfn.bind(thisArg)(current.value, current.key, this);\r
-            }\r
-            else {\r
-                callbackfn(current.value, current.key, this);\r
-            }\r
-            current = current.previous;\r
-        }\r
-    }\r
-    values() {\r
-        let result = [];\r
-        let current = this._head;\r
-        while (current) {\r
-            result.push(current.value);\r
-            current = current.next;\r
-        }\r
-        return result;\r
-    }\r
-    keys() {\r
-        let result = [];\r
-        let current = this._head;\r
-        while (current) {\r
-            result.push(current.key);\r
-            current = current.next;\r
-        }\r
-        return result;\r
-    }\r
-    /* JSON RPC run on es5 which has no Symbol.iterator\r
-    public keys(): IterableIterator<K> {\r
-        let current = this._head;\r
-        let iterator: IterableIterator<K> = {\r
-            [Symbol.iterator]() {\r
-                return iterator;\r
-            },\r
-            next():IteratorResult<K> {\r
-                if (current) {\r
-                    let result = { value: current.key, done: false };\r
-                    current = current.next;\r
-                    return result;\r
-                } else {\r
-                    return { value: undefined, done: true };\r
-                }\r
-            }\r
-        };\r
-        return iterator;\r
-    }\r
-\r
-    public values(): IterableIterator<V> {\r
-        let current = this._head;\r
-        let iterator: IterableIterator<V> = {\r
-            [Symbol.iterator]() {\r
-                return iterator;\r
-            },\r
-            next():IteratorResult<V> {\r
-                if (current) {\r
-                    let result = { value: current.value, done: false };\r
-                    current = current.next;\r
-                    return result;\r
-                } else {\r
-                    return { value: undefined, done: true };\r
-                }\r
-            }\r
-        };\r
-        return iterator;\r
-    }\r
-    */\r
-    addItemFirst(item) {\r
-        // First time Insert\r
-        if (!this._head && !this._tail) {\r
-            this._tail = item;\r
-        }\r
-        else if (!this._head) {\r
-            throw new Error('Invalid list');\r
-        }\r
-        else {\r
-            item.next = this._head;\r
-            this._head.previous = item;\r
-        }\r
-        this._head = item;\r
-    }\r
-    addItemLast(item) {\r
-        // First time Insert\r
-        if (!this._head && !this._tail) {\r
-            this._head = item;\r
-        }\r
-        else if (!this._tail) {\r
-            throw new Error('Invalid list');\r
-        }\r
-        else {\r
-            item.previous = this._tail;\r
-            this._tail.next = item;\r
-        }\r
-        this._tail = item;\r
-    }\r
-    removeItem(item) {\r
-        if (item === this._head && item === this._tail) {\r
-            this._head = undefined;\r
-            this._tail = undefined;\r
-        }\r
-        else if (item === this._head) {\r
-            this._head = item.next;\r
-        }\r
-        else if (item === this._tail) {\r
-            this._tail = item.previous;\r
-        }\r
-        else {\r
-            const next = item.next;\r
-            const previous = item.previous;\r
-            if (!next || !previous) {\r
-                throw new Error('Invalid list');\r
-            }\r
-            next.previous = previous;\r
-            previous.next = next;\r
-        }\r
-    }\r
-    touch(item, touch) {\r
-        if (!this._head || !this._tail) {\r
-            throw new Error('Invalid list');\r
-        }\r
-        if ((touch !== Touch.First && touch !== Touch.Last)) {\r
-            return;\r
-        }\r
-        if (touch === Touch.First) {\r
-            if (item === this._head) {\r
-                return;\r
-            }\r
-            const next = item.next;\r
-            const previous = item.previous;\r
-            // Unlink the item\r
-            if (item === this._tail) {\r
-                // previous must be defined since item was not head but is tail\r
-                // So there are more than on item in the map\r
-                previous.next = undefined;\r
-                this._tail = previous;\r
-            }\r
-            else {\r
-                // Both next and previous are not undefined since item was neither head nor tail.\r
-                next.previous = previous;\r
-                previous.next = next;\r
-            }\r
-            // Insert the node at head\r
-            item.previous = undefined;\r
-            item.next = this._head;\r
-            this._head.previous = item;\r
-            this._head = item;\r
-        }\r
-        else if (touch === Touch.Last) {\r
-            if (item === this._tail) {\r
-                return;\r
-            }\r
-            const next = item.next;\r
-            const previous = item.previous;\r
-            // Unlink the item.\r
-            if (item === this._head) {\r
-                // next must be defined since item was not tail but is head\r
-                // So there are more than on item in the map\r
-                next.previous = undefined;\r
-                this._head = next;\r
-            }\r
-            else {\r
-                // Both next and previous are not undefined since item was neither head nor tail.\r
-                next.previous = previous;\r
-                previous.next = next;\r
-            }\r
-            item.next = undefined;\r
-            item.previous = this._tail;\r
-            this._tail.next = item;\r
-            this._tail = item;\r
-        }\r
-    }\r
-}\r
-exports.LinkedMap = LinkedMap;\r
-
-
-/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const path_1 = __webpack_require__(3);\r
-const os_1 = __webpack_require__(14);\r
-const crypto_1 = __webpack_require__(15);\r
-const net_1 = __webpack_require__(16);\r
-const messageReader_1 = __webpack_require__(8);\r
-const messageWriter_1 = __webpack_require__(10);\r
-function generateRandomPipeName() {\r
-    const randomSuffix = crypto_1.randomBytes(21).toString('hex');\r
-    if (process.platform === 'win32') {\r
-        return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;\r
-    }\r
-    else {\r
-        // Mac/Unix: use socket file\r
-        return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);\r
-    }\r
-}\r
-exports.generateRandomPipeName = generateRandomPipeName;\r
-function createClientPipeTransport(pipeName, encoding = 'utf-8') {\r
-    let connectResolve;\r
-    let connected = new Promise((resolve, _reject) => {\r
-        connectResolve = resolve;\r
-    });\r
-    return new Promise((resolve, reject) => {\r
-        let server = net_1.createServer((socket) => {\r
-            server.close();\r
-            connectResolve([\r
-                new messageReader_1.SocketMessageReader(socket, encoding),\r
-                new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-            ]);\r
-        });\r
-        server.on('error', reject);\r
-        server.listen(pipeName, () => {\r
-            server.removeListener('error', reject);\r
-            resolve({\r
-                onConnected: () => { return connected; }\r
-            });\r
-        });\r
-    });\r
-}\r
-exports.createClientPipeTransport = createClientPipeTransport;\r
-function createServerPipeTransport(pipeName, encoding = 'utf-8') {\r
-    const socket = net_1.createConnection(pipeName);\r
-    return [\r
-        new messageReader_1.SocketMessageReader(socket, encoding),\r
-        new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-    ];\r
-}\r
-exports.createServerPipeTransport = createServerPipeTransport;\r
-
-
-/***/ }),
-/* 14 */
-/***/ (function(module, exports) {
-
-module.exports = require("os");
-
-/***/ }),
-/* 15 */
-/***/ (function(module, exports) {
-
-module.exports = require("crypto");
-
-/***/ }),
-/* 16 */
-/***/ (function(module, exports) {
-
-module.exports = require("net");
-
-/***/ }),
-/* 17 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const net_1 = __webpack_require__(16);\r
-const messageReader_1 = __webpack_require__(8);\r
-const messageWriter_1 = __webpack_require__(10);\r
-function createClientSocketTransport(port, encoding = 'utf-8') {\r
-    let connectResolve;\r
-    let connected = new Promise((resolve, _reject) => {\r
-        connectResolve = resolve;\r
-    });\r
-    return new Promise((resolve, reject) => {\r
-        let server = net_1.createServer((socket) => {\r
-            server.close();\r
-            connectResolve([\r
-                new messageReader_1.SocketMessageReader(socket, encoding),\r
-                new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-            ]);\r
-        });\r
-        server.on('error', reject);\r
-        server.listen(port, '127.0.0.1', () => {\r
-            server.removeListener('error', reject);\r
-            resolve({\r
-                onConnected: () => { return connected; }\r
-            });\r
-        });\r
-    });\r
-}\r
-exports.createClientSocketTransport = createClientSocketTransport;\r
-function createServerSocketTransport(port, encoding = 'utf-8') {\r
-    const socket = net_1.createConnection(port, '127.0.0.1');\r
-    return [\r
-        new messageReader_1.SocketMessageReader(socket, encoding),\r
-        new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-    ];\r
-}\r
-exports.createServerSocketTransport = createServerSocketTransport;\r
-
+//# sourceMappingURL=api.js.map
 
 /***/ }),
-/* 18 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 25 */
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
 
-"use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentSaveReason", function() { return TextDocumentSaveReason; });
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */   "Position": () => /* binding */ Position,
+/* harmony export */   "Range": () => /* binding */ Range,
+/* harmony export */   "Location": () => /* binding */ Location,
+/* harmony export */   "LocationLink": () => /* binding */ LocationLink,
+/* harmony export */   "Color": () => /* binding */ Color,
+/* harmony export */   "ColorInformation": () => /* binding */ ColorInformation,
+/* harmony export */   "ColorPresentation": () => /* binding */ ColorPresentation,
+/* harmony export */   "FoldingRangeKind": () => /* binding */ FoldingRangeKind,
+/* harmony export */   "FoldingRange": () => /* binding */ FoldingRange,
+/* harmony export */   "DiagnosticRelatedInformation": () => /* binding */ DiagnosticRelatedInformation,
+/* harmony export */   "DiagnosticSeverity": () => /* binding */ DiagnosticSeverity,
+/* harmony export */   "DiagnosticTag": () => /* binding */ DiagnosticTag,
+/* harmony export */   "DiagnosticCode": () => /* binding */ DiagnosticCode,
+/* harmony export */   "Diagnostic": () => /* binding */ Diagnostic,
+/* harmony export */   "Command": () => /* binding */ Command,
+/* harmony export */   "TextEdit": () => /* binding */ TextEdit,
+/* harmony export */   "TextDocumentEdit": () => /* binding */ TextDocumentEdit,
+/* harmony export */   "CreateFile": () => /* binding */ CreateFile,
+/* harmony export */   "RenameFile": () => /* binding */ RenameFile,
+/* harmony export */   "DeleteFile": () => /* binding */ DeleteFile,
+/* harmony export */   "WorkspaceEdit": () => /* binding */ WorkspaceEdit,
+/* harmony export */   "WorkspaceChange": () => /* binding */ WorkspaceChange,
+/* harmony export */   "TextDocumentIdentifier": () => /* binding */ TextDocumentIdentifier,
+/* harmony export */   "VersionedTextDocumentIdentifier": () => /* binding */ VersionedTextDocumentIdentifier,
+/* harmony export */   "TextDocumentItem": () => /* binding */ TextDocumentItem,
+/* harmony export */   "MarkupKind": () => /* binding */ MarkupKind,
+/* harmony export */   "MarkupContent": () => /* binding */ MarkupContent,
+/* harmony export */   "CompletionItemKind": () => /* binding */ CompletionItemKind,
+/* harmony export */   "InsertTextFormat": () => /* binding */ InsertTextFormat,
+/* harmony export */   "CompletionItemTag": () => /* binding */ CompletionItemTag,
+/* harmony export */   "InsertReplaceEdit": () => /* binding */ InsertReplaceEdit,
+/* harmony export */   "CompletionItem": () => /* binding */ CompletionItem,
+/* harmony export */   "CompletionList": () => /* binding */ CompletionList,
+/* harmony export */   "MarkedString": () => /* binding */ MarkedString,
+/* harmony export */   "Hover": () => /* binding */ Hover,
+/* harmony export */   "ParameterInformation": () => /* binding */ ParameterInformation,
+/* harmony export */   "SignatureInformation": () => /* binding */ SignatureInformation,
+/* harmony export */   "DocumentHighlightKind": () => /* binding */ DocumentHighlightKind,
+/* harmony export */   "DocumentHighlight": () => /* binding */ DocumentHighlight,
+/* harmony export */   "SymbolKind": () => /* binding */ SymbolKind,
+/* harmony export */   "SymbolTag": () => /* binding */ SymbolTag,
+/* harmony export */   "SymbolInformation": () => /* binding */ SymbolInformation,
+/* harmony export */   "DocumentSymbol": () => /* binding */ DocumentSymbol,
+/* harmony export */   "CodeActionKind": () => /* binding */ CodeActionKind,
+/* harmony export */   "CodeActionContext": () => /* binding */ CodeActionContext,
+/* harmony export */   "CodeAction": () => /* binding */ CodeAction,
+/* harmony export */   "CodeLens": () => /* binding */ CodeLens,
+/* harmony export */   "FormattingOptions": () => /* binding */ FormattingOptions,
+/* harmony export */   "DocumentLink": () => /* binding */ DocumentLink,
+/* harmony export */   "SelectionRange": () => /* binding */ SelectionRange,
+/* harmony export */   "EOL": () => /* binding */ EOL,
+/* harmony export */   "TextDocument": () => /* binding */ TextDocument
+/* harmony export */ });
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
@@ -2986,6 +3428,11 @@ var DiagnosticSeverity;
      */
     DiagnosticSeverity.Hint = 4;
 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
+/**
+ * The diagnostic tags.
+ *
+ * @since 3.15.0
+ */
 var DiagnosticTag;
 (function (DiagnosticTag) {
     /**
@@ -2995,7 +3442,29 @@ var DiagnosticTag;
      * an error squiggle.
      */
     DiagnosticTag.Unnecessary = 1;
+    /**
+     * Deprecated or obsolete code.
+     *
+     * Clients are allowed to rendered diagnostics with this tag strike through.
+     */
+    DiagnosticTag.Deprecated = 2;
 })(DiagnosticTag || (DiagnosticTag = {}));
+/**
+ * The DiagnosticCode namespace provides functions to deal with complex diagnostic codes.
+ *
+ * @since 3.16.0 - Proposed state
+ */
+var DiagnosticCode;
+(function (DiagnosticCode) {
+    /**
+     * Checks whether the given liternal conforms to the [DiagnosticCode](#DiagnosticCode) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return candidate !== undefined && candidate !== null && (Is.number(candidate.value) || Is.string(candidate.value)) && Is.string(candidate.target);
+    }
+    DiagnosticCode.is = is;
+})(DiagnosticCode || (DiagnosticCode = {}));
 /**
  * The Diagnostic namespace provides helper functions to work with
  * [Diagnostic](#Diagnostic) literals.
@@ -3264,6 +3733,9 @@ var WorkspaceChange = /** @class */ (function () {
          * use to be returned from a workspace edit operation like rename.
          */
         get: function () {
+            if (this._workspaceEdit === undefined) {
+                return { documentChanges: [] };
+            }
             return this._workspaceEdit;
         },
         enumerable: true,
@@ -3493,10 +3965,46 @@ var InsertTextFormat;
      * the end of the snippet. Placeholders with equal identifiers are linked,
      * that is typing in one will update others too.
      *
-     * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
+     * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
      */
     InsertTextFormat.Snippet = 2;
 })(InsertTextFormat || (InsertTextFormat = {}));
+/**
+ * Completion item tags are extra annotations that tweak the rendering of a completion
+ * item.
+ *
+ * @since 3.15.0
+ */
+var CompletionItemTag;
+(function (CompletionItemTag) {
+    /**
+     * Render a completion as obsolete, usually using a strike-out.
+     */
+    CompletionItemTag.Deprecated = 1;
+})(CompletionItemTag || (CompletionItemTag = {}));
+/**
+ * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
+ *
+ * @since 3.16.0 - Proposed state
+ */
+var InsertReplaceEdit;
+(function (InsertReplaceEdit) {
+    /**
+     * Creates a new insert / replace edit
+     */
+    function create(newText, insert, replace) {
+        return { newText: newText, insert: insert, replace: replace };
+    }
+    InsertReplaceEdit.create = create;
+    /**
+     * Checks whether the given liternal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
+    }
+    InsertReplaceEdit.is = is;
+})(InsertReplaceEdit || (InsertReplaceEdit = {}));
 /**
  * The CompletionItem namespace provides functions to deal with
  * completion items.
@@ -3537,7 +4045,7 @@ var MarkedString;
      * @param plainText The plain text.
      */
     function fromPlainText(plainText) {
-        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
+        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
     }
     MarkedString.fromPlainText = fromPlainText;
     /**
@@ -3578,7 +4086,6 @@ var ParameterInformation;
         return documentation ? { label: label, documentation: documentation } : { label: label };
     }
     ParameterInformation.create = create;
-    ;
 })(ParameterInformation || (ParameterInformation = {}));
 /**
  * The SignatureInformation namespace provides helper functions to work with
@@ -3674,6 +4181,17 @@ var SymbolKind;
     SymbolKind.Operator = 25;
     SymbolKind.TypeParameter = 26;
 })(SymbolKind || (SymbolKind = {}));
+/**
+ * Symbol tags are extra annotations that tweak the rendering of a symbol.
+ * @since 3.15
+ */
+var SymbolTag;
+(function (SymbolTag) {
+    /**
+     * Render a symbol as obsolete, usually using a strike-out.
+     */
+    SymbolTag.Deprecated = 1;
+})(SymbolTag || (SymbolTag = {}));
 var SymbolInformation;
 (function (SymbolInformation) {
     /**
@@ -3698,18 +4216,7 @@ var SymbolInformation;
     }
     SymbolInformation.create = create;
 })(SymbolInformation || (SymbolInformation = {}));
-/**
- * Represents programming constructs like variables, classes, interfaces etc.
- * that appear in a document. Document symbols can be hierarchical and they
- * have two ranges: one that encloses its definition and one that points to
- * its most interesting range, e.g. the range of an identifier.
- */
-var DocumentSymbol = /** @class */ (function () {
-    function DocumentSymbol() {
-    }
-    return DocumentSymbol;
-}());
-
+var DocumentSymbol;
 (function (DocumentSymbol) {
     /**
      * Creates a new symbol information literal.
@@ -3745,7 +4252,8 @@ var DocumentSymbol = /** @class */ (function () {
             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.children === void 0 || Array.isArray(candidate.children)) &&
+            (candidate.tags === void 0 || Array.isArray(candidate.tags));
     }
     DocumentSymbol.is = is;
 })(DocumentSymbol || (DocumentSymbol = {}));
@@ -3754,6 +4262,10 @@ var DocumentSymbol = /** @class */ (function () {
  */
 var CodeActionKind;
 (function (CodeActionKind) {
+    /**
+     * Empty kind.
+     */
+    CodeActionKind.Empty = '';
     /**
      * Base kind for quickfix actions: 'quickfix'
      */
@@ -3808,6 +4320,15 @@ var CodeActionKind;
      * Base kind for an organize imports source action: `source.organizeImports`
      */
     CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
+    /**
+     * Base kind for auto-fix source actions: `source.fixAll`.
+     *
+     * Fix all actions automatically fix errors that have a clear fix that do not require user input.
+     * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
+     *
+     * @since 3.15.0
+     */
+    CodeActionKind.SourceFixAll = 'source.fixAll';
 })(CodeActionKind || (CodeActionKind = {}));
 /**
  * The CodeActionContext namespace provides helper functions to work with
@@ -3845,7 +4366,7 @@ var CodeAction;
         else {
             result.edit = commandOrEdit;
         }
-        if (kind !== void null) {
+        if (kind !== void 0) {
             result.kind = kind;
         }
         return result;
@@ -3858,6 +4379,7 @@ var CodeAction;
             (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));
     }
     CodeAction.is = is;
@@ -3873,8 +4395,9 @@ var CodeLens;
      */
     function create(range, data) {
         var result = { range: range };
-        if (Is.defined(data))
+        if (Is.defined(data)) {
             result.data = data;
+        }
         return result;
     }
     CodeLens.create = create;
@@ -3909,20 +4432,11 @@ var FormattingOptions;
     }
     FormattingOptions.is = is;
 })(FormattingOptions || (FormattingOptions = {}));
-/**
- * A document link is a range in a text document that links to an internal or external resource, like another
- * text document or a web site.
- */
-var DocumentLink = /** @class */ (function () {
-    function DocumentLink() {
-    }
-    return DocumentLink;
-}());
-
 /**
  * The DocumentLink namespace provides helper functions to work with
  * [DocumentLink](#DocumentLink) literals.
  */
+var DocumentLink;
 (function (DocumentLink) {
     /**
      * Creates a new DocumentLink literal.
@@ -3962,6 +4476,9 @@ var SelectionRange;
     SelectionRange.is = is;
 })(SelectionRange || (SelectionRange = {}));
 var EOL = ['\n', '\r\n', '\r'];
+/**
+ * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
+ */
 var TextDocument;
 (function (TextDocument) {
     /**
@@ -4035,38 +4552,19 @@ var TextDocument;
         while (leftIdx < left.length) {
             data[i++] = left[leftIdx++];
         }
-        while (rightIdx < right.length) {
-            data[i++] = right[rightIdx++];
-        }
-        return data;
-    }
-})(TextDocument || (TextDocument = {}));
-/**
- * Represents reasons why a text document is saved.
- */
-var TextDocumentSaveReason;
-(function (TextDocumentSaveReason) {
-    /**
-     * Manually triggered, e.g. by the user pressing save, by starting debugging,
-     * or by an API call.
-     */
-    TextDocumentSaveReason.Manual = 1;
-    /**
-     * Automatic after a delay.
-     */
-    TextDocumentSaveReason.AfterDelay = 2;
-    /**
-     * When the editor lost focus.
-     */
-    TextDocumentSaveReason.FocusOut = 3;
-})(TextDocumentSaveReason || (TextDocumentSaveReason = {}));
+        while (rightIdx < right.length) {
+            data[i++] = right[rightIdx++];
+        }
+        return data;
+    }
+})(TextDocument || (TextDocument = {}));
 var FullTextDocument = /** @class */ (function () {
     function FullTextDocument(uri, languageId, version, content) {
         this._uri = uri;
         this._languageId = languageId;
         this._version = version;
         this._content = content;
-        this._lineOffsets = null;
+        this._lineOffsets = undefined;
     }
     Object.defineProperty(FullTextDocument.prototype, "uri", {
         get: function () {
@@ -4100,10 +4598,10 @@ var FullTextDocument = /** @class */ (function () {
     FullTextDocument.prototype.update = function (event, version) {
         this._content = event.text;
         this._version = version;
-        this._lineOffsets = null;
+        this._lineOffsets = undefined;
     };
     FullTextDocument.prototype.getLineOffsets = function () {
-        if (this._lineOffsets === null) {
+        if (this._lineOffsets === undefined) {
             var lineOffsets = [];
             var text = this._content;
             var isLineStart = true;
@@ -4209,53 +4707,121 @@ var Is;
 
 
 /***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 26 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
+    constructor(method) {
+        super(method);
+    }
+}
+exports.ProtocolRequestType0 = ProtocolRequestType0;
+class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
+    constructor(method) {
+        super(method);
+    }
+}
+exports.ProtocolRequestType = ProtocolRequestType;
+class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
+    constructor(method) {
+        super(method);
+    }
+}
+exports.ProtocolNotificationType = ProtocolNotificationType;
+class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
+    constructor(method) {
+        super(method);
+    }
+}
+exports.ProtocolNotificationType0 = ProtocolNotificationType0;
+//# sourceMappingURL=messages.js.map
+
+/***/ }),
+/* 27 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
 
-Object.defineProperty(exports, "__esModule", { value: true });
-const Is = __webpack_require__(20);
-const vscode_jsonrpc_1 = __webpack_require__(5);
-const protocol_implementation_1 = __webpack_require__(21);
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const Is = __webpack_require__(28);
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
+const protocol_implementation_1 = __webpack_require__(29);
 exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
-const protocol_typeDefinition_1 = __webpack_require__(22);
+const protocol_typeDefinition_1 = __webpack_require__(30);
 exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
-const protocol_workspaceFolders_1 = __webpack_require__(23);
+const protocol_workspaceFolders_1 = __webpack_require__(31);
 exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
 exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
-const protocol_configuration_1 = __webpack_require__(24);
+const protocol_configuration_1 = __webpack_require__(32);
 exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
-const protocol_colorProvider_1 = __webpack_require__(25);
+const protocol_colorProvider_1 = __webpack_require__(33);
 exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
 exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
-const protocol_foldingRange_1 = __webpack_require__(26);
+const protocol_foldingRange_1 = __webpack_require__(34);
 exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
-const protocol_declaration_1 = __webpack_require__(27);
+const protocol_declaration_1 = __webpack_require__(35);
 exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
-const protocol_selectionRange_1 = __webpack_require__(28);
+const protocol_selectionRange_1 = __webpack_require__(36);
 exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
+const protocol_progress_1 = __webpack_require__(37);
+exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
+exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
+exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
+const protocol_callHierarchy_1 = __webpack_require__(38);
+exports.CallHierarchyIncomingCallsRequest = protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest;
+exports.CallHierarchyOutgoingCallsRequest = protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest;
+exports.CallHierarchyPrepareRequest = protocol_callHierarchy_1.CallHierarchyPrepareRequest;
 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
 let __noDynamicImport;
+/**
+ * The DocumentFilter namespace provides helper functions to work with
+ * [DocumentFilter](#DocumentFilter) literals.
+ */
 var DocumentFilter;
 (function (DocumentFilter) {
     function is(value) {
-        let candidate = value;
+        const candidate = value;
         return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
     }
     DocumentFilter.is = is;
 })(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
+/**
+ * The DocumentSelector namespace provides helper functions to work with
+ * [DocumentSelector](#DocumentSelector)s.
+ */
+var DocumentSelector;
+(function (DocumentSelector) {
+    function is(value) {
+        if (!Array.isArray(value)) {
+            return false;
+        }
+        for (let elem of value) {
+            if (!Is.string(elem) && !DocumentFilter.is(elem)) {
+                return false;
+            }
+        }
+        return true;
+    }
+    DocumentSelector.is = is;
+})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
 /**
  * The `client/registerCapability` request is sent from the server to the client to register a new capability
  * handler on the client side.
  */
 var RegistrationRequest;
 (function (RegistrationRequest) {
-    RegistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/registerCapability');
+    RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
 })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
 /**
  * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
@@ -4263,7 +4829,7 @@ var RegistrationRequest;
  */
 var UnregistrationRequest;
 (function (UnregistrationRequest) {
-    UnregistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/unregisterCapability');
+    UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
 })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
 var ResourceOperationKind;
 (function (ResourceOperationKind) {
@@ -4300,32 +4866,51 @@ var FailureHandlingKind;
     FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
     /**
      * The client tries to undo the operations already executed. But there is no
-     * guaruntee that this is succeeding.
+     * guarantee that this is succeeding.
      */
     FailureHandlingKind.Undo = 'undo';
 })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
 /**
- * Defines how the host (editor) should sync
- * document changes to the language server.
+ * The StaticRegistrationOptions namespace provides helper functions to work with
+ * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
  */
-var TextDocumentSyncKind;
-(function (TextDocumentSyncKind) {
-    /**
-     * Documents should not be synced at all.
-     */
-    TextDocumentSyncKind.None = 0;
-    /**
-     * Documents are synced by always sending the full content
-     * of the document.
-     */
-    TextDocumentSyncKind.Full = 1;
-    /**
-     * Documents are synced by sending the full content on open.
-     * After that only incremental updates to the document are
-     * send.
-     */
-    TextDocumentSyncKind.Incremental = 2;
-})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
+var StaticRegistrationOptions;
+(function (StaticRegistrationOptions) {
+    function hasId(value) {
+        const candidate = value;
+        return candidate && Is.string(candidate.id) && candidate.id.length > 0;
+    }
+    StaticRegistrationOptions.hasId = hasId;
+})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
+/**
+ * The TextDocumentRegistrationOptions namespace provides helper functions to work with
+ * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
+ */
+var TextDocumentRegistrationOptions;
+(function (TextDocumentRegistrationOptions) {
+    function is(value) {
+        const candidate = value;
+        return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
+    }
+    TextDocumentRegistrationOptions.is = is;
+})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
+/**
+ * The WorkDoneProgressOptions namespace provides helper functions to work with
+ * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
+ */
+var WorkDoneProgressOptions;
+(function (WorkDoneProgressOptions) {
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
+    }
+    WorkDoneProgressOptions.is = is;
+    function hasWorkDoneProgress(value) {
+        const candidate = value;
+        return candidate && Is.boolean(candidate.workDoneProgress);
+    }
+    WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
+})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
 /**
  * The initialize request is sent from the client to the server.
  * It is sent once as the request after starting up the server.
@@ -4335,7 +4920,7 @@ var TextDocumentSyncKind;
  */
 var InitializeRequest;
 (function (InitializeRequest) {
-    InitializeRequest.type = new vscode_jsonrpc_1.RequestType('initialize');
+    InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
 })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
 /**
  * Known error codes for an `InitializeError`;
@@ -4356,7 +4941,7 @@ var InitializeError;
  */
 var InitializedNotification;
 (function (InitializedNotification) {
-    InitializedNotification.type = new vscode_jsonrpc_1.NotificationType('initialized');
+    InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
 })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
 //---- Shutdown Method ----
 /**
@@ -4367,7 +4952,7 @@ var InitializedNotification;
  */
 var ShutdownRequest;
 (function (ShutdownRequest) {
-    ShutdownRequest.type = new vscode_jsonrpc_1.RequestType0('shutdown');
+    ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
 })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
 //---- Exit Notification ----
 /**
@@ -4376,9 +4961,8 @@ var ShutdownRequest;
  */
 var ExitNotification;
 (function (ExitNotification) {
-    ExitNotification.type = new vscode_jsonrpc_1.NotificationType0('exit');
+    ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
 })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
-//---- Configuration notification ----
 /**
  * The configuration change notification is sent from the client to the server
  * when the client's configuration has changed. The notification contains
@@ -4386,7 +4970,7 @@ var ExitNotification;
  */
 var DidChangeConfigurationNotification;
 (function (DidChangeConfigurationNotification) {
-    DidChangeConfigurationNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeConfiguration');
+    DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
 })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
 //---- Message show and log notifications ----
 /**
@@ -4417,7 +5001,7 @@ var MessageType;
  */
 var ShowMessageNotification;
 (function (ShowMessageNotification) {
-    ShowMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/showMessage');
+    ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
 })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
 /**
  * The show message request is sent from the server to the client to show a message
@@ -4425,7 +5009,7 @@ var ShowMessageNotification;
  */
 var ShowMessageRequest;
 (function (ShowMessageRequest) {
-    ShowMessageRequest.type = new vscode_jsonrpc_1.RequestType('window/showMessageRequest');
+    ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
 })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
 /**
  * The log message notification is sent from the server to the client to ask
@@ -4433,7 +5017,7 @@ var ShowMessageRequest;
  */
 var LogMessageNotification;
 (function (LogMessageNotification) {
-    LogMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/logMessage');
+    LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
 })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
 //---- Telemetry notification
 /**
@@ -4442,8 +5026,30 @@ var LogMessageNotification;
  */
 var TelemetryEventNotification;
 (function (TelemetryEventNotification) {
-    TelemetryEventNotification.type = new vscode_jsonrpc_1.NotificationType('telemetry/event');
+    TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
 })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
+/**
+ * Defines how the host (editor) should sync
+ * document changes to the language server.
+ */
+var TextDocumentSyncKind;
+(function (TextDocumentSyncKind) {
+    /**
+     * Documents should not be synced at all.
+     */
+    TextDocumentSyncKind.None = 0;
+    /**
+     * Documents are synced by always sending the full content
+     * of the document.
+     */
+    TextDocumentSyncKind.Full = 1;
+    /**
+     * Documents are synced by sending the full content on open.
+     * After that only incremental updates to the document are
+     * send.
+     */
+    TextDocumentSyncKind.Incremental = 2;
+})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
 /**
  * The document open notification is sent from the client to the server to signal
  * newly opened text documents. The document's truth is now managed by the client
@@ -4456,7 +5062,8 @@ var TelemetryEventNotification;
  */
 var DidOpenTextDocumentNotification;
 (function (DidOpenTextDocumentNotification) {
-    DidOpenTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didOpen');
+    DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
+    DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
 })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
 /**
  * The document change notification is sent from the client to the server to signal
@@ -4464,7 +5071,8 @@ var DidOpenTextDocumentNotification;
  */
 var DidChangeTextDocumentNotification;
 (function (DidChangeTextDocumentNotification) {
-    DidChangeTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didChange');
+    DidChangeTextDocumentNotification.method = 'textDocument/didChange';
+    DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
 })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
 /**
  * The document close notification is sent from the client to the server when
@@ -4477,7 +5085,8 @@ var DidChangeTextDocumentNotification;
  */
 var DidCloseTextDocumentNotification;
 (function (DidCloseTextDocumentNotification) {
-    DidCloseTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didClose');
+    DidCloseTextDocumentNotification.method = 'textDocument/didClose';
+    DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
 })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
 /**
  * The document save notification is sent from the client to the server when
@@ -4485,15 +5094,36 @@ var DidCloseTextDocumentNotification;
  */
 var DidSaveTextDocumentNotification;
 (function (DidSaveTextDocumentNotification) {
-    DidSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didSave');
+    DidSaveTextDocumentNotification.method = 'textDocument/didSave';
+    DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
 })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
+/**
+ * Represents reasons why a text document is saved.
+ */
+var TextDocumentSaveReason;
+(function (TextDocumentSaveReason) {
+    /**
+     * Manually triggered, e.g. by the user pressing save, by starting debugging,
+     * or by an API call.
+     */
+    TextDocumentSaveReason.Manual = 1;
+    /**
+     * Automatic after a delay.
+     */
+    TextDocumentSaveReason.AfterDelay = 2;
+    /**
+     * When the editor lost focus.
+     */
+    TextDocumentSaveReason.FocusOut = 3;
+})(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
 /**
  * A document will save notification is sent from the client to the server before
  * the document is actually saved.
  */
 var WillSaveTextDocumentNotification;
 (function (WillSaveTextDocumentNotification) {
-    WillSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/willSave');
+    WillSaveTextDocumentNotification.method = 'textDocument/willSave';
+    WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
 })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
 /**
  * A document will save request is sent from the client to the server before
@@ -4505,16 +5135,16 @@ var WillSaveTextDocumentNotification;
  */
 var WillSaveTextDocumentWaitUntilRequest;
 (function (WillSaveTextDocumentWaitUntilRequest) {
-    WillSaveTextDocumentWaitUntilRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/willSaveWaitUntil');
+    WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
+    WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
 })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
-//---- File eventing ----
 /**
  * The watched files notification is sent from the client to the server when
  * the client detects changes to file watched by the language client.
  */
 var DidChangeWatchedFilesNotification;
 (function (DidChangeWatchedFilesNotification) {
-    DidChangeWatchedFilesNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWatchedFiles');
+    DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
 })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
 /**
  * The file event type
@@ -4549,14 +5179,13 @@ var WatchKind;
      */
     WatchKind.Delete = 4;
 })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
-//---- Diagnostic notification ----
 /**
  * Diagnostics notification are sent from the server to the client to signal
  * results of validation runs.
  */
 var PublishDiagnosticsNotification;
 (function (PublishDiagnosticsNotification) {
-    PublishDiagnosticsNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/publishDiagnostics');
+    PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
 })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
 /**
  * How a completion was triggered
@@ -4591,7 +5220,10 @@ var CompletionTriggerKind;
  */
 var CompletionRequest;
 (function (CompletionRequest) {
-    CompletionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/completion');
+    CompletionRequest.method = 'textDocument/completion';
+    CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
+    /** @deprecated Use CompletionRequest.type */
+    CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
 /**
  * Request to resolve additional information for a given completion item.The request's
@@ -4600,9 +5232,9 @@ var CompletionRequest;
  */
 var CompletionResolveRequest;
 (function (CompletionResolveRequest) {
-    CompletionResolveRequest.type = new vscode_jsonrpc_1.RequestType('completionItem/resolve');
+    CompletionResolveRequest.method = 'completionItem/resolve';
+    CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
 })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
-//---- Hover Support -------------------------------
 /**
  * Request to request hover information at a given text document position. The request's
  * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
@@ -4610,13 +5242,34 @@ var CompletionResolveRequest;
  */
 var HoverRequest;
 (function (HoverRequest) {
-    HoverRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/hover');
+    HoverRequest.method = 'textDocument/hover';
+    HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
 })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
+/**
+ * How a signature help was triggered.
+ *
+ * @since 3.15.0
+ */
+var SignatureHelpTriggerKind;
+(function (SignatureHelpTriggerKind) {
+    /**
+     * Signature help was invoked manually by the user or by a command.
+     */
+    SignatureHelpTriggerKind.Invoked = 1;
+    /**
+     * Signature help was triggered by a trigger character.
+     */
+    SignatureHelpTriggerKind.TriggerCharacter = 2;
+    /**
+     * Signature help was triggered by the cursor moving or by the document content changing.
+     */
+    SignatureHelpTriggerKind.ContentChange = 3;
+})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
 var SignatureHelpRequest;
 (function (SignatureHelpRequest) {
-    SignatureHelpRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/signatureHelp');
+    SignatureHelpRequest.method = 'textDocument/signatureHelp';
+    SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
 })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
-//---- Goto Definition -------------------------------------
 /**
  * A request to resolve the definition location of a symbol at a given text
  * document position. The request's parameter is of type [TextDocumentPosition]
@@ -4626,7 +5279,10 @@ var SignatureHelpRequest;
  */
 var DefinitionRequest;
 (function (DefinitionRequest) {
-    DefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/definition');
+    DefinitionRequest.method = 'textDocument/definition';
+    DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
+    /** @deprecated Use DefinitionRequest.type */
+    DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
 /**
  * A request to resolve project-wide references for the symbol denoted
@@ -4636,9 +5292,11 @@ var DefinitionRequest;
  */
 var ReferencesRequest;
 (function (ReferencesRequest) {
-    ReferencesRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/references');
+    ReferencesRequest.method = 'textDocument/references';
+    ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
+    /** @deprecated Use ReferencesRequest.type */
+    ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
-//---- Document Highlight ----------------------------------
 /**
  * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
  * text document position. The request's parameter is of type [TextDocumentPosition]
@@ -4647,9 +5305,11 @@ var ReferencesRequest;
  */
 var DocumentHighlightRequest;
 (function (DocumentHighlightRequest) {
-    DocumentHighlightRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentHighlight');
+    DocumentHighlightRequest.method = 'textDocument/documentHighlight';
+    DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
+    /** @deprecated Use DocumentHighlightRequest.type */
+    DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
-//---- Document Symbol Provider ---------------------------
 /**
  * A request to list all symbols found in a given text document. The request's
  * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
@@ -4658,9 +5318,21 @@ var DocumentHighlightRequest;
  */
 var DocumentSymbolRequest;
 (function (DocumentSymbolRequest) {
-    DocumentSymbolRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentSymbol');
+    DocumentSymbolRequest.method = 'textDocument/documentSymbol';
+    DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
+    /** @deprecated Use DocumentSymbolRequest.type */
+    DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
-//---- Workspace Symbol Provider ---------------------------
+/**
+ * A request to provide commands for the given text document and range.
+ */
+var CodeActionRequest;
+(function (CodeActionRequest) {
+    CodeActionRequest.method = 'textDocument/codeAction';
+    CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
+    /** @deprecated Use CodeActionRequest.type */
+    CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
 /**
  * A request to list project-wide symbols matching the query string given
  * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
@@ -4669,108 +5341,113 @@ var DocumentSymbolRequest;
  */
 var WorkspaceSymbolRequest;
 (function (WorkspaceSymbolRequest) {
-    WorkspaceSymbolRequest.type = new vscode_jsonrpc_1.RequestType('workspace/symbol');
+    WorkspaceSymbolRequest.method = 'workspace/symbol';
+    WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
+    /** @deprecated Use WorkspaceSymbolRequest.type */
+    WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
-/**
- * A request to provide commands for the given text document and range.
- */
-var CodeActionRequest;
-(function (CodeActionRequest) {
-    CodeActionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeAction');
-})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
 /**
  * A request to provide code lens for the given text document.
  */
 var CodeLensRequest;
 (function (CodeLensRequest) {
-    CodeLensRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeLens');
+    CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
+    /** @deprecated Use CodeLensRequest.type */
+    CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
 /**
  * A request to resolve a command for a given code lens.
  */
 var CodeLensResolveRequest;
 (function (CodeLensResolveRequest) {
-    CodeLensResolveRequest.type = new vscode_jsonrpc_1.RequestType('codeLens/resolve');
+    CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
 })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
+/**
+ * A request to provide document links
+ */
+var DocumentLinkRequest;
+(function (DocumentLinkRequest) {
+    DocumentLinkRequest.method = 'textDocument/documentLink';
+    DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
+    /** @deprecated Use DocumentLinkRequest.type */
+    DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
+/**
+ * Request to resolve additional information for a given document link. The request's
+ * parameter is of type [DocumentLink](#DocumentLink) the response
+ * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
+ */
+var DocumentLinkResolveRequest;
+(function (DocumentLinkResolveRequest) {
+    DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
+})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
 /**
  * A request to to format a whole document.
  */
 var DocumentFormattingRequest;
 (function (DocumentFormattingRequest) {
-    DocumentFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/formatting');
+    DocumentFormattingRequest.method = 'textDocument/formatting';
+    DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
 })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
 /**
  * A request to to format a range in a document.
  */
 var DocumentRangeFormattingRequest;
 (function (DocumentRangeFormattingRequest) {
-    DocumentRangeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rangeFormatting');
+    DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
+    DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
 })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
 /**
  * A request to format a document on type.
  */
 var DocumentOnTypeFormattingRequest;
 (function (DocumentOnTypeFormattingRequest) {
-    DocumentOnTypeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/onTypeFormatting');
+    DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
+    DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
 })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
 /**
  * A request to rename a symbol.
  */
 var RenameRequest;
 (function (RenameRequest) {
-    RenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rename');
+    RenameRequest.method = 'textDocument/rename';
+    RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
 })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
 /**
  * A request to test and perform the setup necessary for a rename.
  */
 var PrepareRenameRequest;
 (function (PrepareRenameRequest) {
-    PrepareRenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/prepareRename');
+    PrepareRenameRequest.method = 'textDocument/prepareRename';
+    PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
 })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
-/**
- * A request to provide document links
- */
-var DocumentLinkRequest;
-(function (DocumentLinkRequest) {
-    DocumentLinkRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentLink');
-})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
-/**
- * Request to resolve additional information for a given document link. The request's
- * parameter is of type [DocumentLink](#DocumentLink) the response
- * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
- */
-var DocumentLinkResolveRequest;
-(function (DocumentLinkResolveRequest) {
-    DocumentLinkResolveRequest.type = new vscode_jsonrpc_1.RequestType('documentLink/resolve');
-})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
 /**
  * A request send from the client to the server to execute a command. The request might return
  * a workspace edit which the client will apply to the workspace.
  */
 var ExecuteCommandRequest;
 (function (ExecuteCommandRequest) {
-    ExecuteCommandRequest.type = new vscode_jsonrpc_1.RequestType('workspace/executeCommand');
+    ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
 })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
 /**
  * A request sent from the server to the client to modified certain resources.
  */
 var ApplyWorkspaceEditRequest;
 (function (ApplyWorkspaceEditRequest) {
-    ApplyWorkspaceEditRequest.type = new vscode_jsonrpc_1.RequestType('workspace/applyEdit');
+    ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
 })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
-
+//# sourceMappingURL=protocol.js.map
 
 /***/ }),
-/* 20 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 28 */
+/***/ ((__unused_webpack_module, exports) => {
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
 
-Object.defineProperty(exports, "__esModule", { value: true });
+Object.defineProperty(exports, "__esModule", ({ value: true }));
 function boolean(value) {
     return value === true || value === false;
 }
@@ -4803,24 +5480,27 @@ function typedArray(value, check) {
     return Array.isArray(value) && value.every(check);
 }
 exports.typedArray = typedArray;
-function thenable(value) {
-    return value && func(value.then);
+function objectLiteral(value) {
+    // Strictly speaking class instances pass this check as well. Since the LSP
+    // doesn't use classes we ignore this for now. If we do we need to add something
+    // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
+    return value !== null && typeof value === 'object';
 }
-exports.thenable = thenable;
-
+exports.objectLiteral = objectLiteral;
+//# sourceMappingURL=is.js.map
 
 /***/ }),
-/* 21 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 29 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
 let __noDynamicImport;
 /**
@@ -4831,22 +5511,25 @@ let __noDynamicImport;
  */
 var ImplementationRequest;
 (function (ImplementationRequest) {
-    ImplementationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/implementation');
+    ImplementationRequest.method = 'textDocument/implementation';
+    ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
+    /** @deprecated Use ImplementationRequest.type */
+    ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
-
+//# sourceMappingURL=protocol.implementation.js.map
 
 /***/ }),
-/* 22 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 30 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
 let __noDynamicImport;
 /**
@@ -4857,28 +5540,30 @@ let __noDynamicImport;
  */
 var TypeDefinitionRequest;
 (function (TypeDefinitionRequest) {
-    TypeDefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/typeDefinition');
+    TypeDefinitionRequest.method = 'textDocument/typeDefinition';
+    TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
+    /** @deprecated Use TypeDefinitionRequest.type */
+    TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
-
+//# sourceMappingURL=protocol.typeDefinition.js.map
 
 /***/ }),
-/* 23 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 31 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const messages_1 = __webpack_require__(26);
 /**
  * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
  */
 var WorkspaceFoldersRequest;
 (function (WorkspaceFoldersRequest) {
-    WorkspaceFoldersRequest.type = new vscode_jsonrpc_1.RequestType0('workspace/workspaceFolders');
+    WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
 })(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
 /**
  * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
@@ -4886,22 +5571,21 @@ var WorkspaceFoldersRequest;
  */
 var DidChangeWorkspaceFoldersNotification;
 (function (DidChangeWorkspaceFoldersNotification) {
-    DidChangeWorkspaceFoldersNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWorkspaceFolders');
+    DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
 })(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
-
+//# sourceMappingURL=protocol.workspaceFolders.js.map
 
 /***/ }),
-/* 24 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 32 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const messages_1 = __webpack_require__(26);
 /**
  * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
  * configuration setting.
@@ -4913,22 +5597,22 @@ const vscode_jsonrpc_1 = __webpack_require__(5);
  */
 var ConfigurationRequest;
 (function (ConfigurationRequest) {
-    ConfigurationRequest.type = new vscode_jsonrpc_1.RequestType('workspace/configuration');
+    ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
 })(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
-
+//# sourceMappingURL=protocol.configuration.js.map
 
 /***/ }),
-/* 25 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 33 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
 /**
  * A request to list all color symbols found in a given text document. The request's
  * parameter is of type [DocumentColorParams](#DocumentColorParams) the
@@ -4937,7 +5621,10 @@ const vscode_jsonrpc_1 = __webpack_require__(5);
  */
 var DocumentColorRequest;
 (function (DocumentColorRequest) {
-    DocumentColorRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentColor');
+    DocumentColorRequest.method = 'textDocument/documentColor';
+    DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
+    /** @deprecated Use DocumentColorRequest.type */
+    DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
 /**
  * A request to list all presentation for a color. The request's
@@ -4947,22 +5634,22 @@ var DocumentColorRequest;
  */
 var ColorPresentationRequest;
 (function (ColorPresentationRequest) {
-    ColorPresentationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/colorPresentation');
+    ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
 })(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
-
+//# sourceMappingURL=protocol.colorProvider.js.map
 
 /***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 34 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
 
-"use strict";
 
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
 /**
  * Enum of known range kinds
  */
@@ -4989,22 +5676,25 @@ var FoldingRangeKind;
  */
 var FoldingRangeRequest;
 (function (FoldingRangeRequest) {
-    FoldingRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/foldingRange');
+    FoldingRangeRequest.method = 'textDocument/foldingRange';
+    FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
+    /** @deprecated Use FoldingRangeRequest.type */
+    FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
-
+//# sourceMappingURL=protocol.foldingRange.js.map
 
 /***/ }),
-/* 27 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 35 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
 let __noDynamicImport;
 /**
@@ -5016,22 +5706,25 @@ let __noDynamicImport;
  */
 var DeclarationRequest;
 (function (DeclarationRequest) {
-    DeclarationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/declaration');
+    DeclarationRequest.method = 'textDocument/declaration';
+    DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
+    /** @deprecated Use DeclarationRequest.type */
+    DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
-
+//# sourceMappingURL=protocol.declaration.js.map
 
 /***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 36 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
 
-"use strict";
 
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
 /**
  * A request to provide selection ranges in a document. The request's
  * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
@@ -5040,115 +5733,232 @@ const vscode_jsonrpc_1 = __webpack_require__(5);
  */
 var SelectionRangeRequest;
 (function (SelectionRangeRequest) {
-    SelectionRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/selectionRange');
+    SelectionRangeRequest.method = 'textDocument/selectionRange';
+    SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
+    /** @deprecated  Use SelectionRangeRequest.type */
+    SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
 })(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
+//# sourceMappingURL=protocol.selectionRange.js.map
 
+/***/ }),
+/* 37 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+const messages_1 = __webpack_require__(26);
+var WorkDoneProgress;
+(function (WorkDoneProgress) {
+    WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
+})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
+/**
+ * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
+ * reporting from the server.
+ */
+var WorkDoneProgressCreateRequest;
+(function (WorkDoneProgressCreateRequest) {
+    WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
+})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
+/**
+ * The `window/workDoneProgress/cancel` notification is sent from  the client to the server to cancel a progress
+ * initiated on the server side.
+ */
+var WorkDoneProgressCancelNotification;
+(function (WorkDoneProgressCancelNotification) {
+    WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
+})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
+//# sourceMappingURL=protocol.progress.js.map
 
 /***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 38 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) TypeFox and others. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const messages_1 = __webpack_require__(26);
 /**
- * The direction of a call hierarchy request.
+ * A request to result a `CallHierarchyItem` in a document at a given position.
+ * Can be used as an input to a incoming or outgoing call hierarchy.
+ *
+ * @since 3.16.0
  */
-var CallHierarchyDirection;
-(function (CallHierarchyDirection) {
-    /**
-     * The callers
-     */
-    CallHierarchyDirection.CallsFrom = 1;
-    /**
-     * The callees
-     */
-    CallHierarchyDirection.CallsTo = 2;
-})(CallHierarchyDirection = exports.CallHierarchyDirection || (exports.CallHierarchyDirection = {}));
+var CallHierarchyPrepareRequest;
+(function (CallHierarchyPrepareRequest) {
+    CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
+    CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
+})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
 /**
- * Request to provide the call hierarchy at a given text document position.
+ * A request to resolve the incoming calls for a given `CallHierarchyItem`.
  *
- * The request's parameter is of type [CallHierarchyParams](#CallHierarchyParams). The response
- * is of type [CallHierarchyCall[]](#CallHierarchyCall) or a Thenable that resolves to such.
+ * @since 3.16.0
+ */
+var CallHierarchyIncomingCallsRequest;
+(function (CallHierarchyIncomingCallsRequest) {
+    CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
+    CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
+})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
+/**
+ * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
  *
- * Evaluates the symbol defined (or referenced) at the given position, and returns all incoming or outgoing calls to the symbol(s).
+ * @since 3.16.0
  */
-var CallHierarchyRequest;
-(function (CallHierarchyRequest) {
-    CallHierarchyRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/callHierarchy');
-})(CallHierarchyRequest = exports.CallHierarchyRequest || (exports.CallHierarchyRequest = {}));
-
+var CallHierarchyOutgoingCallsRequest;
+(function (CallHierarchyOutgoingCallsRequest) {
+    CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
+    CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
+})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
+//# sourceMappingURL=protocol.callHierarchy.js.map
 
 /***/ }),
-/* 30 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 39 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
 
-"use strict";
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const vscode_jsonrpc_1 = __webpack_require__(6);
+function createProtocolConnection(input, output, logger, options) {
+    if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
+        options = { connectionStrategy: options };
+    }
+    return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options);
+}
+exports.createProtocolConnection = createProtocolConnection;
+//# sourceMappingURL=connection.js.map
 
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_jsonrpc_1 = __webpack_require__(5);
+/***/ }),
+/* 40 */
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+const messages_1 = __webpack_require__(26);
+/**
+ * A set of predefined token types. This set is not fixed
+ * an clients can specify additional token types via the
+ * corresponding client capabilities.
+ *
+ * @since 3.16.0 - Proposed state
+ */
+var SemanticTokenTypes;
+(function (SemanticTokenTypes) {
+    SemanticTokenTypes["namespace"] = "namespace";
+    SemanticTokenTypes["type"] = "type";
+    SemanticTokenTypes["class"] = "class";
+    SemanticTokenTypes["enum"] = "enum";
+    SemanticTokenTypes["interface"] = "interface";
+    SemanticTokenTypes["struct"] = "struct";
+    SemanticTokenTypes["typeParameter"] = "typeParameter";
+    SemanticTokenTypes["parameter"] = "parameter";
+    SemanticTokenTypes["variable"] = "variable";
+    SemanticTokenTypes["property"] = "property";
+    SemanticTokenTypes["enumMember"] = "enumMember";
+    SemanticTokenTypes["event"] = "event";
+    SemanticTokenTypes["function"] = "function";
+    SemanticTokenTypes["member"] = "member";
+    SemanticTokenTypes["macro"] = "macro";
+    SemanticTokenTypes["keyword"] = "keyword";
+    SemanticTokenTypes["modifier"] = "modifier";
+    SemanticTokenTypes["comment"] = "comment";
+    SemanticTokenTypes["string"] = "string";
+    SemanticTokenTypes["number"] = "number";
+    SemanticTokenTypes["regexp"] = "regexp";
+    SemanticTokenTypes["operator"] = "operator";
+})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
 /**
- * The `window/progress/start` notification is sent from the server to the client
- * to initiate a progress.
+ * A set of predefined token modifiers. This set is not fixed
+ * an clients can specify additional token types via the
+ * corresponding client capabilities.
+ *
+ * @since 3.16.0 - Proposed state
  */
-var ProgressStartNotification;
-(function (ProgressStartNotification) {
-    ProgressStartNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/start');
-})(ProgressStartNotification = exports.ProgressStartNotification || (exports.ProgressStartNotification = {}));
+var SemanticTokenModifiers;
+(function (SemanticTokenModifiers) {
+    SemanticTokenModifiers["declaration"] = "declaration";
+    SemanticTokenModifiers["definition"] = "definition";
+    SemanticTokenModifiers["readonly"] = "readonly";
+    SemanticTokenModifiers["static"] = "static";
+    SemanticTokenModifiers["deprecated"] = "deprecated";
+    SemanticTokenModifiers["abstract"] = "abstract";
+    SemanticTokenModifiers["async"] = "async";
+    SemanticTokenModifiers["modification"] = "modification";
+    SemanticTokenModifiers["documentation"] = "documentation";
+    SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
+})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
 /**
- * The `window/progress/report` notification is sent from the server to the client
- * to initiate a progress.
+ * @since 3.16.0 - Proposed state
  */
-var ProgressReportNotification;
-(function (ProgressReportNotification) {
-    ProgressReportNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/report');
-})(ProgressReportNotification = exports.ProgressReportNotification || (exports.ProgressReportNotification = {}));
+var SemanticTokens;
+(function (SemanticTokens) {
+    function is(value) {
+        const candidate = value;
+        return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
+            Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
+    }
+    SemanticTokens.is = is;
+})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
 /**
- * The `window/progress/done` notification is sent from the server to the client
- * to initiate a progress.
+ * @since 3.16.0 - Proposed state
  */
-var ProgressDoneNotification;
-(function (ProgressDoneNotification) {
-    ProgressDoneNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/done');
-})(ProgressDoneNotification = exports.ProgressDoneNotification || (exports.ProgressDoneNotification = {}));
+var SemanticTokensRequest;
+(function (SemanticTokensRequest) {
+    SemanticTokensRequest.method = 'textDocument/semanticTokens';
+    SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
+})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
 /**
- * The `window/progress/cancel` notification is sent client to the server to cancel a progress
- * initiated on the server side.
+ * @since 3.16.0 - Proposed state
  */
-var ProgressCancelNotification;
-(function (ProgressCancelNotification) {
-    ProgressCancelNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/cancel');
-})(ProgressCancelNotification = exports.ProgressCancelNotification || (exports.ProgressCancelNotification = {}));
-
+var SemanticTokensEditsRequest;
+(function (SemanticTokensEditsRequest) {
+    SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
+    SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
+})(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
+/**
+ * @since 3.16.0 - Proposed state
+ */
+var SemanticTokensRangeRequest;
+(function (SemanticTokensRangeRequest) {
+    SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
+    SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
+})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
+//# sourceMappingURL=protocol.semanticTokens.proposed.js.map
 
 /***/ }),
-/* 31 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 41 */
+/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
 
-"use strict";
 
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
     return new (P || (P = Promise))(function (resolve, reject) {
         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
         function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
-        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
         step((generator = generator.apply(thisArg, _arguments || [])).next());
     });
 };
-Object.defineProperty(exports, "__esModule", { value: true });
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.activateTagClosing = void 0;
 const coc_nvim_1 = __webpack_require__(1);
 const vscode_languageserver_protocol_1 = __webpack_require__(4);
 function activateTagClosing(tagProvider, supportedLanguages, configName) {
@@ -5207,11 +6017,14 @@ function activateTagClosing(tagProvider, supportedLanguages, configName) {
                 clearTimeout(timeout);
             }
             let lastChange = changes[changes.length - 1];
+            if (!vscode_languageserver_protocol_1.Range.is(lastChange['range']) || !emptyRange(lastChange['range'])) {
+                return;
+            }
             let lastCharacter = lastChange.text[lastChange.text.length - 1];
-            if (lastChange.rangeLength > 0 || lastCharacter !== '>' && lastCharacter !== '/') {
+            if (lastCharacter !== '>' && lastCharacter !== '/') {
                 return;
             }
-            let rangeStart = lastChange.range.start;
+            let rangeStart = lastChange['range'].start;
             let version = document.version;
             timeout = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
                 let position = vscode_languageserver_protocol_1.Position.create(rangeStart.line, rangeStart.character + lastChange.text.length);
@@ -5242,7 +6055,71 @@ function activateTagClosing(tagProvider, supportedLanguages, configName) {
     });
 }
 exports.activateTagClosing = activateTagClosing;
+function emptyRange(range) {
+    return range.start.line == range.end.line && range.start.character == range.end.character;
+}
 
 
 /***/ })
-/******/ ])));
\ No newline at end of file
+/******/       ]);
+/************************************************************************/
+/******/       // The module cache
+/******/       var __webpack_module_cache__ = {};
+/******/       
+/******/       // The require function
+/******/       function __webpack_require__(moduleId) {
+/******/               // Check if module is in cache
+/******/               if(__webpack_module_cache__[moduleId]) {
+/******/                       return __webpack_module_cache__[moduleId].exports;
+/******/               }
+/******/               // Create a new module (and put it into the cache)
+/******/               var module = __webpack_module_cache__[moduleId] = {
+/******/                       // no module.id needed
+/******/                       // no module.loaded needed
+/******/                       exports: {}
+/******/               };
+/******/       
+/******/               // Execute the module function
+/******/               __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/       
+/******/               // Return the exports of the module
+/******/               return module.exports;
+/******/       }
+/******/       
+/************************************************************************/
+/******/       /* webpack/runtime/define property getters */
+/******/       (() => {
+/******/               // define getter functions for harmony exports
+/******/               __webpack_require__.d = (exports, definition) => {
+/******/                       for(var key in definition) {
+/******/                               if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+/******/                                       Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+/******/                               }
+/******/                       }
+/******/               };
+/******/       })();
+/******/       
+/******/       /* webpack/runtime/hasOwnProperty shorthand */
+/******/       (() => {
+/******/               __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
+/******/       })();
+/******/       
+/******/       /* webpack/runtime/make namespace object */
+/******/       (() => {
+/******/               // define __esModule on exports
+/******/               __webpack_require__.r = (exports) => {
+/******/                       if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/                               Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/                       }
+/******/                       Object.defineProperty(exports, '__esModule', { value: true });
+/******/               };
+/******/       })();
+/******/       
+/************************************************************************/
+/******/       // module exports must be returned from runtime so entry inlining is disabled
+/******/       // startup
+/******/       // Load entry module and return exports
+/******/       return __webpack_require__(0);
+/******/ })()
+
+));
\ No newline at end of file