/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunkbrowser_esm_webpack"] = self["webpackChunkbrowser_esm_webpack"] || []).push([["vendors-node_modules_monaco-editor_esm_vs_language_typescript_tsMode_js"],{

/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/languageFeatures.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/monaco-editor/esm/vs/language/typescript/languageFeatures.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"flattenDiagnosticMessageText\": () => (/* binding */ flattenDiagnosticMessageText),\n/* harmony export */   \"Adapter\": () => (/* binding */ Adapter),\n/* harmony export */   \"LibFiles\": () => (/* binding */ LibFiles),\n/* harmony export */   \"DiagnosticsAdapter\": () => (/* binding */ DiagnosticsAdapter),\n/* harmony export */   \"SuggestAdapter\": () => (/* binding */ SuggestAdapter),\n/* harmony export */   \"SignatureHelpAdapter\": () => (/* binding */ SignatureHelpAdapter),\n/* harmony export */   \"QuickInfoAdapter\": () => (/* binding */ QuickInfoAdapter),\n/* harmony export */   \"OccurrencesAdapter\": () => (/* binding */ OccurrencesAdapter),\n/* harmony export */   \"DefinitionAdapter\": () => (/* binding */ DefinitionAdapter),\n/* harmony export */   \"ReferenceAdapter\": () => (/* binding */ ReferenceAdapter),\n/* harmony export */   \"OutlineAdapter\": () => (/* binding */ OutlineAdapter),\n/* harmony export */   \"Kind\": () => (/* binding */ Kind),\n/* harmony export */   \"FormatHelper\": () => (/* binding */ FormatHelper),\n/* harmony export */   \"FormatAdapter\": () => (/* binding */ FormatAdapter),\n/* harmony export */   \"FormatOnTypeAdapter\": () => (/* binding */ FormatOnTypeAdapter),\n/* harmony export */   \"CodeActionAdaptor\": () => (/* binding */ CodeActionAdaptor),\n/* harmony export */   \"RenameAdapter\": () => (/* binding */ RenameAdapter)\n/* harmony export */ });\n/* harmony import */ var _lib_lib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/lib.index.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/lib/lib.index.js\");\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js\");\n/*---------------------------------------------------------------------------------------------\r\n *  Copyright (c) Microsoft Corporation. All rights reserved.\r\n *  Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nvar __extends = (undefined && undefined.__extends) || (function () {\r\n    var extendStatics = function (d, b) {\r\n        extendStatics = Object.setPrototypeOf ||\r\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n        return extendStatics(d, b);\r\n    };\r\n    return function (d, b) {\r\n        if (typeof b !== \"function\" && b !== null)\r\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n        extendStatics(d, b);\r\n        function __() { this.constructor = d; }\r\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n    };\r\n})();\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\n\r\n\r\n//#region utils copied from typescript to prevent loading the entire typescriptServices ---\r\nvar IndentStyle;\r\n(function (IndentStyle) {\r\n    IndentStyle[IndentStyle[\"None\"] = 0] = \"None\";\r\n    IndentStyle[IndentStyle[\"Block\"] = 1] = \"Block\";\r\n    IndentStyle[IndentStyle[\"Smart\"] = 2] = \"Smart\";\r\n})(IndentStyle || (IndentStyle = {}));\r\nfunction flattenDiagnosticMessageText(diag, newLine, indent) {\r\n    if (indent === void 0) { indent = 0; }\r\n    if (typeof diag === 'string') {\r\n        return diag;\r\n    }\r\n    else if (diag === undefined) {\r\n        return '';\r\n    }\r\n    var result = '';\r\n    if (indent) {\r\n        result += newLine;\r\n        for (var i = 0; i < indent; i++) {\r\n            result += '  ';\r\n        }\r\n    }\r\n    result += diag.messageText;\r\n    indent++;\r\n    if (diag.next) {\r\n        for (var _i = 0, _a = diag.next; _i < _a.length; _i++) {\r\n            var kid = _a[_i];\r\n            result += flattenDiagnosticMessageText(kid, newLine, indent);\r\n        }\r\n    }\r\n    return result;\r\n}\r\nfunction displayPartsToString(displayParts) {\r\n    if (displayParts) {\r\n        return displayParts.map(function (displayPart) { return displayPart.text; }).join('');\r\n    }\r\n    return '';\r\n}\r\n//#endregion\r\nvar Adapter = /** @class */ (function () {\r\n    function Adapter(_worker) {\r\n        this._worker = _worker;\r\n    }\r\n    // protected _positionToOffset(model: editor.ITextModel, position: monaco.IPosition): number {\r\n    // \treturn model.getOffsetAt(position);\r\n    // }\r\n    // protected _offsetToPosition(model: editor.ITextModel, offset: number): monaco.IPosition {\r\n    // \treturn model.getPositionAt(offset);\r\n    // }\r\n    Adapter.prototype._textSpanToRange = function (model, span) {\r\n        var p1 = model.getPositionAt(span.start);\r\n        var p2 = model.getPositionAt(span.start + span.length);\r\n        var startLineNumber = p1.lineNumber, startColumn = p1.column;\r\n        var endLineNumber = p2.lineNumber, endColumn = p2.column;\r\n        return { startLineNumber: startLineNumber, startColumn: startColumn, endLineNumber: endLineNumber, endColumn: endColumn };\r\n    };\r\n    return Adapter;\r\n}());\r\n\r\n// --- lib files\r\nvar LibFiles = /** @class */ (function () {\r\n    function LibFiles(_worker) {\r\n        this._worker = _worker;\r\n        this._libFiles = {};\r\n        this._hasFetchedLibFiles = false;\r\n        this._fetchLibFilesPromise = null;\r\n    }\r\n    LibFiles.prototype.isLibFile = function (uri) {\r\n        if (!uri) {\r\n            return false;\r\n        }\r\n        if (uri.path.indexOf('/lib.') === 0) {\r\n            return !!_lib_lib_index_js__WEBPACK_IMPORTED_MODULE_0__.libFileSet[uri.path.slice(1)];\r\n        }\r\n        return false;\r\n    };\r\n    LibFiles.prototype.getOrCreateModel = function (uri) {\r\n        var model = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.getModel(uri);\r\n        if (model) {\r\n            return model;\r\n        }\r\n        if (this.isLibFile(uri) && this._hasFetchedLibFiles) {\r\n            return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.createModel(this._libFiles[uri.path.slice(1)], 'typescript', uri);\r\n        }\r\n        return null;\r\n    };\r\n    LibFiles.prototype._containsLibFile = function (uris) {\r\n        for (var _i = 0, uris_1 = uris; _i < uris_1.length; _i++) {\r\n            var uri = uris_1[_i];\r\n            if (this.isLibFile(uri)) {\r\n                return true;\r\n            }\r\n        }\r\n        return false;\r\n    };\r\n    LibFiles.prototype.fetchLibFilesIfNecessary = function (uris) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        if (!this._containsLibFile(uris)) {\r\n                            // no lib files necessary\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, this._fetchLibFiles()];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [2 /*return*/];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    LibFiles.prototype._fetchLibFiles = function () {\r\n        var _this = this;\r\n        if (!this._fetchLibFilesPromise) {\r\n            this._fetchLibFilesPromise = this._worker()\r\n                .then(function (w) { return w.getLibFiles(); })\r\n                .then(function (libFiles) {\r\n                _this._hasFetchedLibFiles = true;\r\n                _this._libFiles = libFiles;\r\n            });\r\n        }\r\n        return this._fetchLibFilesPromise;\r\n    };\r\n    return LibFiles;\r\n}());\r\n\r\n// --- diagnostics --- ---\r\nvar DiagnosticCategory;\r\n(function (DiagnosticCategory) {\r\n    DiagnosticCategory[DiagnosticCategory[\"Warning\"] = 0] = \"Warning\";\r\n    DiagnosticCategory[DiagnosticCategory[\"Error\"] = 1] = \"Error\";\r\n    DiagnosticCategory[DiagnosticCategory[\"Suggestion\"] = 2] = \"Suggestion\";\r\n    DiagnosticCategory[DiagnosticCategory[\"Message\"] = 3] = \"Message\";\r\n})(DiagnosticCategory || (DiagnosticCategory = {}));\r\nvar DiagnosticsAdapter = /** @class */ (function (_super) {\r\n    __extends(DiagnosticsAdapter, _super);\r\n    function DiagnosticsAdapter(_libFiles, _defaults, _selector, worker) {\r\n        var _this = _super.call(this, worker) || this;\r\n        _this._libFiles = _libFiles;\r\n        _this._defaults = _defaults;\r\n        _this._selector = _selector;\r\n        _this._disposables = [];\r\n        _this._listener = Object.create(null);\r\n        var onModelAdd = function (model) {\r\n            if (model.getModeId() !== _selector) {\r\n                return;\r\n            }\r\n            var handle;\r\n            var changeSubscription = model.onDidChangeContent(function () {\r\n                clearTimeout(handle);\r\n                handle = setTimeout(function () { return _this._doValidate(model); }, 500);\r\n            });\r\n            _this._listener[model.uri.toString()] = {\r\n                dispose: function () {\r\n                    changeSubscription.dispose();\r\n                    clearTimeout(handle);\r\n                }\r\n            };\r\n            _this._doValidate(model);\r\n        };\r\n        var onModelRemoved = function (model) {\r\n            _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.setModelMarkers(model, _this._selector, []);\r\n            var key = model.uri.toString();\r\n            if (_this._listener[key]) {\r\n                _this._listener[key].dispose();\r\n                delete _this._listener[key];\r\n            }\r\n        };\r\n        _this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.onDidCreateModel(onModelAdd));\r\n        _this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.onWillDisposeModel(onModelRemoved));\r\n        _this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.onDidChangeModelLanguage(function (event) {\r\n            onModelRemoved(event.model);\r\n            onModelAdd(event.model);\r\n        }));\r\n        _this._disposables.push({\r\n            dispose: function () {\r\n                for (var _i = 0, _a = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.getModels(); _i < _a.length; _i++) {\r\n                    var model = _a[_i];\r\n                    onModelRemoved(model);\r\n                }\r\n            }\r\n        });\r\n        var recomputeDiagostics = function () {\r\n            // redo diagnostics when options change\r\n            for (var _i = 0, _a = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.getModels(); _i < _a.length; _i++) {\r\n                var model = _a[_i];\r\n                onModelRemoved(model);\r\n                onModelAdd(model);\r\n            }\r\n        };\r\n        _this._disposables.push(_this._defaults.onDidChange(recomputeDiagostics));\r\n        _this._disposables.push(_this._defaults.onDidExtraLibsChange(recomputeDiagostics));\r\n        _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.getModels().forEach(onModelAdd);\r\n        return _this;\r\n    }\r\n    DiagnosticsAdapter.prototype.dispose = function () {\r\n        this._disposables.forEach(function (d) { return d && d.dispose(); });\r\n        this._disposables = [];\r\n    };\r\n    DiagnosticsAdapter.prototype._doValidate = function (model) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var worker, promises, _a, noSyntaxValidation, noSemanticValidation, noSuggestionDiagnostics, allDiagnostics, diagnostics, relatedUris;\r\n            var _this = this;\r\n            return __generator(this, function (_b) {\r\n                switch (_b.label) {\r\n                    case 0: return [4 /*yield*/, this._worker(model.uri)];\r\n                    case 1:\r\n                        worker = _b.sent();\r\n                        if (model.isDisposed()) {\r\n                            // model was disposed in the meantime\r\n                            return [2 /*return*/];\r\n                        }\r\n                        promises = [];\r\n                        _a = this._defaults.getDiagnosticsOptions(), noSyntaxValidation = _a.noSyntaxValidation, noSemanticValidation = _a.noSemanticValidation, noSuggestionDiagnostics = _a.noSuggestionDiagnostics;\r\n                        if (!noSyntaxValidation) {\r\n                            promises.push(worker.getSyntacticDiagnostics(model.uri.toString()));\r\n                        }\r\n                        if (!noSemanticValidation) {\r\n                            promises.push(worker.getSemanticDiagnostics(model.uri.toString()));\r\n                        }\r\n                        if (!noSuggestionDiagnostics) {\r\n                            promises.push(worker.getSuggestionDiagnostics(model.uri.toString()));\r\n                        }\r\n                        return [4 /*yield*/, Promise.all(promises)];\r\n                    case 2:\r\n                        allDiagnostics = _b.sent();\r\n                        if (!allDiagnostics || model.isDisposed()) {\r\n                            // model was disposed in the meantime\r\n                            return [2 /*return*/];\r\n                        }\r\n                        diagnostics = allDiagnostics\r\n                            .reduce(function (p, c) { return c.concat(p); }, [])\r\n                            .filter(function (d) {\r\n                            return (_this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore || []).indexOf(d.code) ===\r\n                                -1;\r\n                        });\r\n                        relatedUris = diagnostics\r\n                            .map(function (d) { return d.relatedInformation || []; })\r\n                            .reduce(function (p, c) { return c.concat(p); }, [])\r\n                            .map(function (relatedInformation) {\r\n                            return relatedInformation.file ? _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Uri.parse(relatedInformation.file.fileName) : null;\r\n                        });\r\n                        return [4 /*yield*/, this._libFiles.fetchLibFilesIfNecessary(relatedUris)];\r\n                    case 3:\r\n                        _b.sent();\r\n                        if (model.isDisposed()) {\r\n                            // model was disposed in the meantime\r\n                            return [2 /*return*/];\r\n                        }\r\n                        _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.setModelMarkers(model, this._selector, diagnostics.map(function (d) { return _this._convertDiagnostics(model, d); }));\r\n                        return [2 /*return*/];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    DiagnosticsAdapter.prototype._convertDiagnostics = function (model, diag) {\r\n        var diagStart = diag.start || 0;\r\n        var diagLength = diag.length || 1;\r\n        var _a = model.getPositionAt(diagStart), startLineNumber = _a.lineNumber, startColumn = _a.column;\r\n        var _b = model.getPositionAt(diagStart + diagLength), endLineNumber = _b.lineNumber, endColumn = _b.column;\r\n        var tags = [];\r\n        if (diag.reportsUnnecessary) {\r\n            tags.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.MarkerTag.Unnecessary);\r\n        }\r\n        if (diag.reportsDeprecated) {\r\n            tags.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.MarkerTag.Deprecated);\r\n        }\r\n        return {\r\n            severity: this._tsDiagnosticCategoryToMarkerSeverity(diag.category),\r\n            startLineNumber: startLineNumber,\r\n            startColumn: startColumn,\r\n            endLineNumber: endLineNumber,\r\n            endColumn: endColumn,\r\n            message: flattenDiagnosticMessageText(diag.messageText, '\\n'),\r\n            code: diag.code.toString(),\r\n            tags: tags,\r\n            relatedInformation: this._convertRelatedInformation(model, diag.relatedInformation)\r\n        };\r\n    };\r\n    DiagnosticsAdapter.prototype._convertRelatedInformation = function (model, relatedInformation) {\r\n        var _this = this;\r\n        if (!relatedInformation) {\r\n            return;\r\n        }\r\n        var result = [];\r\n        relatedInformation.forEach(function (info) {\r\n            var relatedResource = model;\r\n            if (info.file) {\r\n                var relatedResourceUri = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Uri.parse(info.file.fileName);\r\n                relatedResource = _this._libFiles.getOrCreateModel(relatedResourceUri);\r\n            }\r\n            if (!relatedResource) {\r\n                return;\r\n            }\r\n            var infoStart = info.start || 0;\r\n            var infoLength = info.length || 1;\r\n            var _a = relatedResource.getPositionAt(infoStart), startLineNumber = _a.lineNumber, startColumn = _a.column;\r\n            var _b = relatedResource.getPositionAt(infoStart + infoLength), endLineNumber = _b.lineNumber, endColumn = _b.column;\r\n            result.push({\r\n                resource: relatedResource.uri,\r\n                startLineNumber: startLineNumber,\r\n                startColumn: startColumn,\r\n                endLineNumber: endLineNumber,\r\n                endColumn: endColumn,\r\n                message: flattenDiagnosticMessageText(info.messageText, '\\n')\r\n            });\r\n        });\r\n        return result;\r\n    };\r\n    DiagnosticsAdapter.prototype._tsDiagnosticCategoryToMarkerSeverity = function (category) {\r\n        switch (category) {\r\n            case DiagnosticCategory.Error:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.MarkerSeverity.Error;\r\n            case DiagnosticCategory.Message:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.MarkerSeverity.Info;\r\n            case DiagnosticCategory.Warning:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.MarkerSeverity.Warning;\r\n            case DiagnosticCategory.Suggestion:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.MarkerSeverity.Hint;\r\n        }\r\n        return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.MarkerSeverity.Info;\r\n    };\r\n    return DiagnosticsAdapter;\r\n}(Adapter));\r\n\r\nvar SuggestAdapter = /** @class */ (function (_super) {\r\n    __extends(SuggestAdapter, _super);\r\n    function SuggestAdapter() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    Object.defineProperty(SuggestAdapter.prototype, \"triggerCharacters\", {\r\n        get: function () {\r\n            return ['.'];\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    SuggestAdapter.prototype.provideCompletionItems = function (model, position, _context, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var wordInfo, wordRange, resource, offset, worker, info, suggestions;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        wordInfo = model.getWordUntilPosition(position);\r\n                        wordRange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);\r\n                        resource = model.uri;\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getCompletionsAtPosition(resource.toString(), offset)];\r\n                    case 2:\r\n                        info = _a.sent();\r\n                        if (!info || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        suggestions = info.entries.map(function (entry) {\r\n                            var _a;\r\n                            var range = wordRange;\r\n                            if (entry.replacementSpan) {\r\n                                var p1 = model.getPositionAt(entry.replacementSpan.start);\r\n                                var p2 = model.getPositionAt(entry.replacementSpan.start + entry.replacementSpan.length);\r\n                                range = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Range(p1.lineNumber, p1.column, p2.lineNumber, p2.column);\r\n                            }\r\n                            var tags = [];\r\n                            if (((_a = entry.kindModifiers) === null || _a === void 0 ? void 0 : _a.indexOf('deprecated')) !== -1) {\r\n                                tags.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemTag.Deprecated);\r\n                            }\r\n                            return {\r\n                                uri: resource,\r\n                                position: position,\r\n                                offset: offset,\r\n                                range: range,\r\n                                label: entry.name,\r\n                                insertText: entry.name,\r\n                                sortText: entry.sortText,\r\n                                kind: SuggestAdapter.convertKind(entry.kind),\r\n                                tags: tags\r\n                            };\r\n                        });\r\n                        return [2 /*return*/, {\r\n                                suggestions: suggestions\r\n                            }];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    SuggestAdapter.prototype.resolveCompletionItem = function (item, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var myItem, resource, position, offset, worker, details;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        myItem = item;\r\n                        resource = myItem.uri;\r\n                        position = myItem.position;\r\n                        offset = myItem.offset;\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        return [4 /*yield*/, worker.getCompletionEntryDetails(resource.toString(), offset, myItem.label)];\r\n                    case 2:\r\n                        details = _a.sent();\r\n                        if (!details) {\r\n                            return [2 /*return*/, myItem];\r\n                        }\r\n                        return [2 /*return*/, {\r\n                                uri: resource,\r\n                                position: position,\r\n                                label: details.name,\r\n                                kind: SuggestAdapter.convertKind(details.kind),\r\n                                detail: displayPartsToString(details.displayParts),\r\n                                documentation: {\r\n                                    value: SuggestAdapter.createDocumentationString(details)\r\n                                }\r\n                            }];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    SuggestAdapter.convertKind = function (kind) {\r\n        switch (kind) {\r\n            case Kind.primitiveType:\r\n            case Kind.keyword:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Keyword;\r\n            case Kind.variable:\r\n            case Kind.localVariable:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Variable;\r\n            case Kind.memberVariable:\r\n            case Kind.memberGetAccessor:\r\n            case Kind.memberSetAccessor:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Field;\r\n            case Kind.function:\r\n            case Kind.memberFunction:\r\n            case Kind.constructSignature:\r\n            case Kind.callSignature:\r\n            case Kind.indexSignature:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Function;\r\n            case Kind.enum:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Enum;\r\n            case Kind.module:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Module;\r\n            case Kind.class:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Class;\r\n            case Kind.interface:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Interface;\r\n            case Kind.warning:\r\n                return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.File;\r\n        }\r\n        return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.CompletionItemKind.Property;\r\n    };\r\n    SuggestAdapter.createDocumentationString = function (details) {\r\n        var documentationString = displayPartsToString(details.documentation);\r\n        if (details.tags) {\r\n            for (var _i = 0, _a = details.tags; _i < _a.length; _i++) {\r\n                var tag = _a[_i];\r\n                documentationString += \"\\n\\n\" + tagToString(tag);\r\n            }\r\n        }\r\n        return documentationString;\r\n    };\r\n    return SuggestAdapter;\r\n}(Adapter));\r\n\r\nfunction tagToString(tag) {\r\n    var tagLabel = \"*@\" + tag.name + \"*\";\r\n    if (tag.name === 'param' && tag.text) {\r\n        var _a = tag.text.split(' '), paramName = _a[0], rest = _a.slice(1);\r\n        tagLabel += \"`\" + paramName + \"`\";\r\n        if (rest.length > 0)\r\n            tagLabel += \" \\u2014 \" + rest.join(' ');\r\n    }\r\n    else if (tag.text) {\r\n        tagLabel += \" \\u2014 \" + tag.text;\r\n    }\r\n    return tagLabel;\r\n}\r\nvar SignatureHelpAdapter = /** @class */ (function (_super) {\r\n    __extends(SignatureHelpAdapter, _super);\r\n    function SignatureHelpAdapter() {\r\n        var _this = _super !== null && _super.apply(this, arguments) || this;\r\n        _this.signatureHelpTriggerCharacters = ['(', ','];\r\n        return _this;\r\n    }\r\n    SignatureHelpAdapter._toSignatureHelpTriggerReason = function (context) {\r\n        switch (context.triggerKind) {\r\n            case _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SignatureHelpTriggerKind.TriggerCharacter:\r\n                if (context.triggerCharacter) {\r\n                    if (context.isRetrigger) {\r\n                        return { kind: 'retrigger', triggerCharacter: context.triggerCharacter };\r\n                    }\r\n                    else {\r\n                        return { kind: 'characterTyped', triggerCharacter: context.triggerCharacter };\r\n                    }\r\n                }\r\n                else {\r\n                    return { kind: 'invoked' };\r\n                }\r\n            case _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SignatureHelpTriggerKind.ContentChange:\r\n                return context.isRetrigger ? { kind: 'retrigger' } : { kind: 'invoked' };\r\n            case _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SignatureHelpTriggerKind.Invoke:\r\n            default:\r\n                return { kind: 'invoked' };\r\n        }\r\n    };\r\n    SignatureHelpAdapter.prototype.provideSignatureHelp = function (model, position, token, context) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, offset, worker, info, ret;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getSignatureHelpItems(resource.toString(), offset, {\r\n                                triggerReason: SignatureHelpAdapter._toSignatureHelpTriggerReason(context)\r\n                            })];\r\n                    case 2:\r\n                        info = _a.sent();\r\n                        if (!info || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        ret = {\r\n                            activeSignature: info.selectedItemIndex,\r\n                            activeParameter: info.argumentIndex,\r\n                            signatures: []\r\n                        };\r\n                        info.items.forEach(function (item) {\r\n                            var signature = {\r\n                                label: '',\r\n                                parameters: []\r\n                            };\r\n                            signature.documentation = {\r\n                                value: displayPartsToString(item.documentation)\r\n                            };\r\n                            signature.label += displayPartsToString(item.prefixDisplayParts);\r\n                            item.parameters.forEach(function (p, i, a) {\r\n                                var label = displayPartsToString(p.displayParts);\r\n                                var parameter = {\r\n                                    label: label,\r\n                                    documentation: {\r\n                                        value: displayPartsToString(p.documentation)\r\n                                    }\r\n                                };\r\n                                signature.label += label;\r\n                                signature.parameters.push(parameter);\r\n                                if (i < a.length - 1) {\r\n                                    signature.label += displayPartsToString(item.separatorDisplayParts);\r\n                                }\r\n                            });\r\n                            signature.label += displayPartsToString(item.suffixDisplayParts);\r\n                            ret.signatures.push(signature);\r\n                        });\r\n                        return [2 /*return*/, {\r\n                                value: ret,\r\n                                dispose: function () { }\r\n                            }];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return SignatureHelpAdapter;\r\n}(Adapter));\r\n\r\n// --- hover ------\r\nvar QuickInfoAdapter = /** @class */ (function (_super) {\r\n    __extends(QuickInfoAdapter, _super);\r\n    function QuickInfoAdapter() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    QuickInfoAdapter.prototype.provideHover = function (model, position, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, offset, worker, info, documentation, tags, contents;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getQuickInfoAtPosition(resource.toString(), offset)];\r\n                    case 2:\r\n                        info = _a.sent();\r\n                        if (!info || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        documentation = displayPartsToString(info.documentation);\r\n                        tags = info.tags ? info.tags.map(function (tag) { return tagToString(tag); }).join('  \\n\\n') : '';\r\n                        contents = displayPartsToString(info.displayParts);\r\n                        return [2 /*return*/, {\r\n                                range: this._textSpanToRange(model, info.textSpan),\r\n                                contents: [\r\n                                    {\r\n                                        value: '```typescript\\n' + contents + '\\n```\\n'\r\n                                    },\r\n                                    {\r\n                                        value: documentation + (tags ? '\\n\\n' + tags : '')\r\n                                    }\r\n                                ]\r\n                            }];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return QuickInfoAdapter;\r\n}(Adapter));\r\n\r\n// --- occurrences ------\r\nvar OccurrencesAdapter = /** @class */ (function (_super) {\r\n    __extends(OccurrencesAdapter, _super);\r\n    function OccurrencesAdapter() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    OccurrencesAdapter.prototype.provideDocumentHighlights = function (model, position, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, offset, worker, entries;\r\n            var _this = this;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getOccurrencesAtPosition(resource.toString(), offset)];\r\n                    case 2:\r\n                        entries = _a.sent();\r\n                        if (!entries || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [2 /*return*/, entries.map(function (entry) {\r\n                                return {\r\n                                    range: _this._textSpanToRange(model, entry.textSpan),\r\n                                    kind: entry.isWriteAccess\r\n                                        ? _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.DocumentHighlightKind.Write\r\n                                        : _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.DocumentHighlightKind.Text\r\n                                };\r\n                            })];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return OccurrencesAdapter;\r\n}(Adapter));\r\n\r\n// --- definition ------\r\nvar DefinitionAdapter = /** @class */ (function (_super) {\r\n    __extends(DefinitionAdapter, _super);\r\n    function DefinitionAdapter(_libFiles, worker) {\r\n        var _this = _super.call(this, worker) || this;\r\n        _this._libFiles = _libFiles;\r\n        return _this;\r\n    }\r\n    DefinitionAdapter.prototype.provideDefinition = function (model, position, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, offset, worker, entries, result, _i, entries_1, entry, uri, refModel;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getDefinitionAtPosition(resource.toString(), offset)];\r\n                    case 2:\r\n                        entries = _a.sent();\r\n                        if (!entries || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        // Fetch lib files if necessary\r\n                        return [4 /*yield*/, this._libFiles.fetchLibFilesIfNecessary(entries.map(function (entry) { return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Uri.parse(entry.fileName); }))];\r\n                    case 3:\r\n                        // Fetch lib files if necessary\r\n                        _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        result = [];\r\n                        for (_i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\r\n                            entry = entries_1[_i];\r\n                            uri = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Uri.parse(entry.fileName);\r\n                            refModel = this._libFiles.getOrCreateModel(uri);\r\n                            if (refModel) {\r\n                                result.push({\r\n                                    uri: uri,\r\n                                    range: this._textSpanToRange(refModel, entry.textSpan)\r\n                                });\r\n                            }\r\n                        }\r\n                        return [2 /*return*/, result];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return DefinitionAdapter;\r\n}(Adapter));\r\n\r\n// --- references ------\r\nvar ReferenceAdapter = /** @class */ (function (_super) {\r\n    __extends(ReferenceAdapter, _super);\r\n    function ReferenceAdapter(_libFiles, worker) {\r\n        var _this = _super.call(this, worker) || this;\r\n        _this._libFiles = _libFiles;\r\n        return _this;\r\n    }\r\n    ReferenceAdapter.prototype.provideReferences = function (model, position, context, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, offset, worker, entries, result, _i, entries_2, entry, uri, refModel;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getReferencesAtPosition(resource.toString(), offset)];\r\n                    case 2:\r\n                        entries = _a.sent();\r\n                        if (!entries || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        // Fetch lib files if necessary\r\n                        return [4 /*yield*/, this._libFiles.fetchLibFilesIfNecessary(entries.map(function (entry) { return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Uri.parse(entry.fileName); }))];\r\n                    case 3:\r\n                        // Fetch lib files if necessary\r\n                        _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        result = [];\r\n                        for (_i = 0, entries_2 = entries; _i < entries_2.length; _i++) {\r\n                            entry = entries_2[_i];\r\n                            uri = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Uri.parse(entry.fileName);\r\n                            refModel = this._libFiles.getOrCreateModel(uri);\r\n                            if (refModel) {\r\n                                result.push({\r\n                                    uri: uri,\r\n                                    range: this._textSpanToRange(refModel, entry.textSpan)\r\n                                });\r\n                            }\r\n                        }\r\n                        return [2 /*return*/, result];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return ReferenceAdapter;\r\n}(Adapter));\r\n\r\n// --- outline ------\r\nvar OutlineAdapter = /** @class */ (function (_super) {\r\n    __extends(OutlineAdapter, _super);\r\n    function OutlineAdapter() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    OutlineAdapter.prototype.provideDocumentSymbols = function (model, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, worker, items, convert, result;\r\n            var _this = this;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getNavigationBarItems(resource.toString())];\r\n                    case 2:\r\n                        items = _a.sent();\r\n                        if (!items || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        convert = function (bucket, item, containerLabel) {\r\n                            var result = {\r\n                                name: item.text,\r\n                                detail: '',\r\n                                kind: (outlineTypeTable[item.kind] || _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Variable),\r\n                                range: _this._textSpanToRange(model, item.spans[0]),\r\n                                selectionRange: _this._textSpanToRange(model, item.spans[0]),\r\n                                tags: [],\r\n                                containerName: containerLabel\r\n                            };\r\n                            if (item.childItems && item.childItems.length > 0) {\r\n                                for (var _i = 0, _a = item.childItems; _i < _a.length; _i++) {\r\n                                    var child = _a[_i];\r\n                                    convert(bucket, child, result.name);\r\n                                }\r\n                            }\r\n                            bucket.push(result);\r\n                        };\r\n                        result = [];\r\n                        items.forEach(function (item) { return convert(result, item); });\r\n                        return [2 /*return*/, result];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return OutlineAdapter;\r\n}(Adapter));\r\n\r\nvar Kind = /** @class */ (function () {\r\n    function Kind() {\r\n    }\r\n    Kind.unknown = '';\r\n    Kind.keyword = 'keyword';\r\n    Kind.script = 'script';\r\n    Kind.module = 'module';\r\n    Kind.class = 'class';\r\n    Kind.interface = 'interface';\r\n    Kind.type = 'type';\r\n    Kind.enum = 'enum';\r\n    Kind.variable = 'var';\r\n    Kind.localVariable = 'local var';\r\n    Kind.function = 'function';\r\n    Kind.localFunction = 'local function';\r\n    Kind.memberFunction = 'method';\r\n    Kind.memberGetAccessor = 'getter';\r\n    Kind.memberSetAccessor = 'setter';\r\n    Kind.memberVariable = 'property';\r\n    Kind.constructorImplementation = 'constructor';\r\n    Kind.callSignature = 'call';\r\n    Kind.indexSignature = 'index';\r\n    Kind.constructSignature = 'construct';\r\n    Kind.parameter = 'parameter';\r\n    Kind.typeParameter = 'type parameter';\r\n    Kind.primitiveType = 'primitive type';\r\n    Kind.label = 'label';\r\n    Kind.alias = 'alias';\r\n    Kind.const = 'const';\r\n    Kind.let = 'let';\r\n    Kind.warning = 'warning';\r\n    return Kind;\r\n}());\r\n\r\nvar outlineTypeTable = Object.create(null);\r\noutlineTypeTable[Kind.module] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Module;\r\noutlineTypeTable[Kind.class] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Class;\r\noutlineTypeTable[Kind.enum] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Enum;\r\noutlineTypeTable[Kind.interface] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Interface;\r\noutlineTypeTable[Kind.memberFunction] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Method;\r\noutlineTypeTable[Kind.memberVariable] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.memberGetAccessor] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.memberSetAccessor] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.variable] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.const] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.localVariable] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.variable] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.function] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Function;\r\noutlineTypeTable[Kind.localFunction] = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.languages.SymbolKind.Function;\r\n// --- formatting ----\r\nvar FormatHelper = /** @class */ (function (_super) {\r\n    __extends(FormatHelper, _super);\r\n    function FormatHelper() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    FormatHelper._convertOptions = function (options) {\r\n        return {\r\n            ConvertTabsToSpaces: options.insertSpaces,\r\n            TabSize: options.tabSize,\r\n            IndentSize: options.tabSize,\r\n            IndentStyle: IndentStyle.Smart,\r\n            NewLineCharacter: '\\n',\r\n            InsertSpaceAfterCommaDelimiter: true,\r\n            InsertSpaceAfterSemicolonInForStatements: true,\r\n            InsertSpaceBeforeAndAfterBinaryOperators: true,\r\n            InsertSpaceAfterKeywordsInControlFlowStatements: true,\r\n            InsertSpaceAfterFunctionKeywordForAnonymousFunctions: true,\r\n            InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,\r\n            InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,\r\n            InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,\r\n            PlaceOpenBraceOnNewLineForControlBlocks: false,\r\n            PlaceOpenBraceOnNewLineForFunctions: false\r\n        };\r\n    };\r\n    FormatHelper.prototype._convertTextChanges = function (model, change) {\r\n        return {\r\n            text: change.newText,\r\n            range: this._textSpanToRange(model, change.span)\r\n        };\r\n    };\r\n    return FormatHelper;\r\n}(Adapter));\r\n\r\nvar FormatAdapter = /** @class */ (function (_super) {\r\n    __extends(FormatAdapter, _super);\r\n    function FormatAdapter() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    FormatAdapter.prototype.provideDocumentRangeFormattingEdits = function (model, range, options, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, startOffset, endOffset, worker, edits;\r\n            var _this = this;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        startOffset = model.getOffsetAt({\r\n                            lineNumber: range.startLineNumber,\r\n                            column: range.startColumn\r\n                        });\r\n                        endOffset = model.getOffsetAt({\r\n                            lineNumber: range.endLineNumber,\r\n                            column: range.endColumn\r\n                        });\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getFormattingEditsForRange(resource.toString(), startOffset, endOffset, FormatHelper._convertOptions(options))];\r\n                    case 2:\r\n                        edits = _a.sent();\r\n                        if (!edits || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [2 /*return*/, edits.map(function (edit) { return _this._convertTextChanges(model, edit); })];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return FormatAdapter;\r\n}(FormatHelper));\r\n\r\nvar FormatOnTypeAdapter = /** @class */ (function (_super) {\r\n    __extends(FormatOnTypeAdapter, _super);\r\n    function FormatOnTypeAdapter() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    Object.defineProperty(FormatOnTypeAdapter.prototype, \"autoFormatTriggerCharacters\", {\r\n        get: function () {\r\n            return [';', '}', '\\n'];\r\n        },\r\n        enumerable: false,\r\n        configurable: true\r\n    });\r\n    FormatOnTypeAdapter.prototype.provideOnTypeFormattingEdits = function (model, position, ch, options, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, offset, worker, edits;\r\n            var _this = this;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getFormattingEditsAfterKeystroke(resource.toString(), offset, ch, FormatHelper._convertOptions(options))];\r\n                    case 2:\r\n                        edits = _a.sent();\r\n                        if (!edits || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [2 /*return*/, edits.map(function (edit) { return _this._convertTextChanges(model, edit); })];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return FormatOnTypeAdapter;\r\n}(FormatHelper));\r\n\r\n// --- code actions ------\r\nvar CodeActionAdaptor = /** @class */ (function (_super) {\r\n    __extends(CodeActionAdaptor, _super);\r\n    function CodeActionAdaptor() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    CodeActionAdaptor.prototype.provideCodeActions = function (model, range, context, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, start, end, formatOptions, errorCodes, worker, codeFixes, actions;\r\n            var _this = this;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        start = model.getOffsetAt({\r\n                            lineNumber: range.startLineNumber,\r\n                            column: range.startColumn\r\n                        });\r\n                        end = model.getOffsetAt({\r\n                            lineNumber: range.endLineNumber,\r\n                            column: range.endColumn\r\n                        });\r\n                        formatOptions = FormatHelper._convertOptions(model.getOptions());\r\n                        errorCodes = context.markers\r\n                            .filter(function (m) { return m.code; })\r\n                            .map(function (m) { return m.code; })\r\n                            .map(Number);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getCodeFixesAtPosition(resource.toString(), start, end, errorCodes, formatOptions)];\r\n                    case 2:\r\n                        codeFixes = _a.sent();\r\n                        if (!codeFixes || model.isDisposed()) {\r\n                            return [2 /*return*/, { actions: [], dispose: function () { } }];\r\n                        }\r\n                        actions = codeFixes\r\n                            .filter(function (fix) {\r\n                            // Removes any 'make a new file'-type code fix\r\n                            return fix.changes.filter(function (change) { return change.isNewFile; }).length === 0;\r\n                        })\r\n                            .map(function (fix) {\r\n                            return _this._tsCodeFixActionToMonacoCodeAction(model, context, fix);\r\n                        });\r\n                        return [2 /*return*/, {\r\n                                actions: actions,\r\n                                dispose: function () { }\r\n                            }];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    CodeActionAdaptor.prototype._tsCodeFixActionToMonacoCodeAction = function (model, context, codeFix) {\r\n        var edits = [];\r\n        for (var _i = 0, _a = codeFix.changes; _i < _a.length; _i++) {\r\n            var change = _a[_i];\r\n            for (var _b = 0, _c = change.textChanges; _b < _c.length; _b++) {\r\n                var textChange = _c[_b];\r\n                edits.push({\r\n                    resource: model.uri,\r\n                    edit: {\r\n                        range: this._textSpanToRange(model, textChange.span),\r\n                        text: textChange.newText\r\n                    }\r\n                });\r\n            }\r\n        }\r\n        var action = {\r\n            title: codeFix.description,\r\n            edit: { edits: edits },\r\n            diagnostics: context.markers,\r\n            kind: 'quickfix'\r\n        };\r\n        return action;\r\n    };\r\n    return CodeActionAdaptor;\r\n}(FormatHelper));\r\n\r\n// --- rename ----\r\nvar RenameAdapter = /** @class */ (function (_super) {\r\n    __extends(RenameAdapter, _super);\r\n    function RenameAdapter() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    RenameAdapter.prototype.provideRenameEdits = function (model, position, newName, token) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var resource, fileName, offset, worker, renameInfo, renameLocations, edits, _i, renameLocations_1, renameLocation, resource_1, model_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        resource = model.uri;\r\n                        fileName = resource.toString();\r\n                        offset = model.getOffsetAt(position);\r\n                        return [4 /*yield*/, this._worker(resource)];\r\n                    case 1:\r\n                        worker = _a.sent();\r\n                        if (model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        return [4 /*yield*/, worker.getRenameInfo(fileName, offset, {\r\n                                allowRenameOfImportPath: false\r\n                            })];\r\n                    case 2:\r\n                        renameInfo = _a.sent();\r\n                        if (renameInfo.canRename === false) {\r\n                            // use explicit comparison so that the discriminated union gets resolved properly\r\n                            return [2 /*return*/, {\r\n                                    edits: [],\r\n                                    rejectReason: renameInfo.localizedErrorMessage\r\n                                }];\r\n                        }\r\n                        if (renameInfo.fileToRename !== undefined) {\r\n                            throw new Error('Renaming files is not supported.');\r\n                        }\r\n                        return [4 /*yield*/, worker.findRenameLocations(fileName, offset, \r\n                            /*strings*/ false, \r\n                            /*comments*/ false, \r\n                            /*prefixAndSuffix*/ false)];\r\n                    case 3:\r\n                        renameLocations = _a.sent();\r\n                        if (!renameLocations || model.isDisposed()) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        edits = [];\r\n                        for (_i = 0, renameLocations_1 = renameLocations; _i < renameLocations_1.length; _i++) {\r\n                            renameLocation = renameLocations_1[_i];\r\n                            resource_1 = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.Uri.parse(renameLocation.fileName);\r\n                            model_1 = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__.editor.getModel(resource_1);\r\n                            if (model_1) {\r\n                                edits.push({\r\n                                    resource: resource_1,\r\n                                    edit: {\r\n                                        range: this._textSpanToRange(model_1, renameLocation.textSpan),\r\n                                        text: newName\r\n                                    }\r\n                                });\r\n                            }\r\n                            else {\r\n                                throw new Error(\"Unknown URI \" + resource_1 + \".\");\r\n                            }\r\n                        }\r\n                        return [2 /*return*/, { edits: edits }];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    return RenameAdapter;\r\n}(Adapter));\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/typescript/languageFeatures.js?");

/***/ }),

/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/lib/lib.index.js":
/*!********************************************************************************!*\
  !*** ./node_modules/monaco-editor/esm/vs/language/typescript/lib/lib.index.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"libFileSet\": () => (/* binding */ libFileSet)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n *  Copyright (c) Microsoft Corporation. All rights reserved.\r\n *  Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n//\r\n// **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`\r\n//\r\n/** Contains all the lib files */\r\nvar libFileSet = {};\r\nlibFileSet['lib.d.ts'] = true;\r\nlibFileSet['lib.dom.d.ts'] = true;\r\nlibFileSet['lib.dom.iterable.d.ts'] = true;\r\nlibFileSet['lib.es2015.collection.d.ts'] = true;\r\nlibFileSet['lib.es2015.core.d.ts'] = true;\r\nlibFileSet['lib.es2015.d.ts'] = true;\r\nlibFileSet['lib.es2015.generator.d.ts'] = true;\r\nlibFileSet['lib.es2015.iterable.d.ts'] = true;\r\nlibFileSet['lib.es2015.promise.d.ts'] = true;\r\nlibFileSet['lib.es2015.proxy.d.ts'] = true;\r\nlibFileSet['lib.es2015.reflect.d.ts'] = true;\r\nlibFileSet['lib.es2015.symbol.d.ts'] = true;\r\nlibFileSet['lib.es2015.symbol.wellknown.d.ts'] = true;\r\nlibFileSet['lib.es2016.array.include.d.ts'] = true;\r\nlibFileSet['lib.es2016.d.ts'] = true;\r\nlibFileSet['lib.es2016.full.d.ts'] = true;\r\nlibFileSet['lib.es2017.d.ts'] = true;\r\nlibFileSet['lib.es2017.full.d.ts'] = true;\r\nlibFileSet['lib.es2017.intl.d.ts'] = true;\r\nlibFileSet['lib.es2017.object.d.ts'] = true;\r\nlibFileSet['lib.es2017.sharedmemory.d.ts'] = true;\r\nlibFileSet['lib.es2017.string.d.ts'] = true;\r\nlibFileSet['lib.es2017.typedarrays.d.ts'] = true;\r\nlibFileSet['lib.es2018.asyncgenerator.d.ts'] = true;\r\nlibFileSet['lib.es2018.asynciterable.d.ts'] = true;\r\nlibFileSet['lib.es2018.d.ts'] = true;\r\nlibFileSet['lib.es2018.full.d.ts'] = true;\r\nlibFileSet['lib.es2018.intl.d.ts'] = true;\r\nlibFileSet['lib.es2018.promise.d.ts'] = true;\r\nlibFileSet['lib.es2018.regexp.d.ts'] = true;\r\nlibFileSet['lib.es2019.array.d.ts'] = true;\r\nlibFileSet['lib.es2019.d.ts'] = true;\r\nlibFileSet['lib.es2019.full.d.ts'] = true;\r\nlibFileSet['lib.es2019.object.d.ts'] = true;\r\nlibFileSet['lib.es2019.string.d.ts'] = true;\r\nlibFileSet['lib.es2019.symbol.d.ts'] = true;\r\nlibFileSet['lib.es2020.bigint.d.ts'] = true;\r\nlibFileSet['lib.es2020.d.ts'] = true;\r\nlibFileSet['lib.es2020.full.d.ts'] = true;\r\nlibFileSet['lib.es2020.intl.d.ts'] = true;\r\nlibFileSet['lib.es2020.promise.d.ts'] = true;\r\nlibFileSet['lib.es2020.sharedmemory.d.ts'] = true;\r\nlibFileSet['lib.es2020.string.d.ts'] = true;\r\nlibFileSet['lib.es2020.symbol.wellknown.d.ts'] = true;\r\nlibFileSet['lib.es5.d.ts'] = true;\r\nlibFileSet['lib.es6.d.ts'] = true;\r\nlibFileSet['lib.esnext.d.ts'] = true;\r\nlibFileSet['lib.esnext.full.d.ts'] = true;\r\nlibFileSet['lib.esnext.intl.d.ts'] = true;\r\nlibFileSet['lib.esnext.promise.d.ts'] = true;\r\nlibFileSet['lib.esnext.string.d.ts'] = true;\r\nlibFileSet['lib.esnext.weakref.d.ts'] = true;\r\nlibFileSet['lib.scripthost.d.ts'] = true;\r\nlibFileSet['lib.webworker.d.ts'] = true;\r\nlibFileSet['lib.webworker.importscripts.d.ts'] = true;\r\nlibFileSet['lib.webworker.iterable.d.ts'] = true;\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/typescript/lib/lib.index.js?");

/***/ }),

/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/tsMode.js":
/*!*************************************************************************!*\
  !*** ./node_modules/monaco-editor/esm/vs/language/typescript/tsMode.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"setupTypeScript\": () => (/* binding */ setupTypeScript),\n/* harmony export */   \"setupJavaScript\": () => (/* binding */ setupJavaScript),\n/* harmony export */   \"getJavaScriptWorker\": () => (/* binding */ getJavaScriptWorker),\n/* harmony export */   \"getTypeScriptWorker\": () => (/* binding */ getTypeScriptWorker)\n/* harmony export */ });\n/* harmony import */ var _workerManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./workerManager.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/workerManager.js\");\n/* harmony import */ var _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./languageFeatures.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/languageFeatures.js\");\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js\");\n/*---------------------------------------------------------------------------------------------\r\n *  Copyright (c) Microsoft Corporation. All rights reserved.\r\n *  Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n\r\n\r\nvar javaScriptWorker;\r\nvar typeScriptWorker;\r\nfunction setupTypeScript(defaults) {\r\n    typeScriptWorker = setupMode(defaults, 'typescript');\r\n}\r\nfunction setupJavaScript(defaults) {\r\n    javaScriptWorker = setupMode(defaults, 'javascript');\r\n}\r\nfunction getJavaScriptWorker() {\r\n    return new Promise(function (resolve, reject) {\r\n        if (!javaScriptWorker) {\r\n            return reject('JavaScript not registered!');\r\n        }\r\n        resolve(javaScriptWorker);\r\n    });\r\n}\r\nfunction getTypeScriptWorker() {\r\n    return new Promise(function (resolve, reject) {\r\n        if (!typeScriptWorker) {\r\n            return reject('TypeScript not registered!');\r\n        }\r\n        resolve(typeScriptWorker);\r\n    });\r\n}\r\nfunction setupMode(defaults, modeId) {\r\n    var client = new _workerManager_js__WEBPACK_IMPORTED_MODULE_0__.WorkerManager(modeId, defaults);\r\n    var worker = function () {\r\n        var uris = [];\r\n        for (var _i = 0; _i < arguments.length; _i++) {\r\n            uris[_i] = arguments[_i];\r\n        }\r\n        return client.getLanguageServiceWorker.apply(client, uris);\r\n    };\r\n    var libFiles = new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.LibFiles(worker);\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerCompletionItemProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.SuggestAdapter(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerSignatureHelpProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.SignatureHelpAdapter(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerHoverProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.QuickInfoAdapter(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerDocumentHighlightProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.OccurrencesAdapter(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerDefinitionProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.DefinitionAdapter(libFiles, worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerReferenceProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.ReferenceAdapter(libFiles, worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerDocumentSymbolProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.OutlineAdapter(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerDocumentRangeFormattingEditProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.FormatAdapter(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerOnTypeFormattingEditProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.FormatOnTypeAdapter(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerCodeActionProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.CodeActionAdaptor(worker));\r\n    _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__.languages.registerRenameProvider(modeId, new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.RenameAdapter(worker));\r\n    new _languageFeatures_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticsAdapter(libFiles, defaults, modeId, worker);\r\n    return worker;\r\n}\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/typescript/tsMode.js?");

/***/ }),

/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/workerManager.js":
/*!********************************************************************************!*\
  !*** ./node_modules/monaco-editor/esm/vs/language/typescript/workerManager.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"WorkerManager\": () => (/* binding */ WorkerManager)\n/* harmony export */ });\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js\");\n/*---------------------------------------------------------------------------------------------\r\n *  Copyright (c) Microsoft Corporation. All rights reserved.\r\n *  Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\n\r\nvar WorkerManager = /** @class */ (function () {\r\n    function WorkerManager(modeId, defaults) {\r\n        var _this = this;\r\n        this._modeId = modeId;\r\n        this._defaults = defaults;\r\n        this._worker = null;\r\n        this._client = null;\r\n        this._configChangeListener = this._defaults.onDidChange(function () { return _this._stopWorker(); });\r\n        this._updateExtraLibsToken = 0;\r\n        this._extraLibsChangeListener = this._defaults.onDidExtraLibsChange(function () {\r\n            return _this._updateExtraLibs();\r\n        });\r\n    }\r\n    WorkerManager.prototype._stopWorker = function () {\r\n        if (this._worker) {\r\n            this._worker.dispose();\r\n            this._worker = null;\r\n        }\r\n        this._client = null;\r\n    };\r\n    WorkerManager.prototype.dispose = function () {\r\n        this._configChangeListener.dispose();\r\n        this._extraLibsChangeListener.dispose();\r\n        this._stopWorker();\r\n    };\r\n    WorkerManager.prototype._updateExtraLibs = function () {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var myToken, proxy;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        if (!this._worker) {\r\n                            return [2 /*return*/];\r\n                        }\r\n                        myToken = ++this._updateExtraLibsToken;\r\n                        return [4 /*yield*/, this._worker.getProxy()];\r\n                    case 1:\r\n                        proxy = _a.sent();\r\n                        if (this._updateExtraLibsToken !== myToken) {\r\n                            // avoid multiple calls\r\n                            return [2 /*return*/];\r\n                        }\r\n                        proxy.updateExtraLibs(this._defaults.getExtraLibs());\r\n                        return [2 /*return*/];\r\n                }\r\n            });\r\n        });\r\n    };\r\n    WorkerManager.prototype._getClient = function () {\r\n        var _this = this;\r\n        if (!this._client) {\r\n            this._worker = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.createWebWorker({\r\n                // module that exports the create() method and returns a `TypeScriptWorker` instance\r\n                moduleId: 'vs/language/typescript/tsWorker',\r\n                label: this._modeId,\r\n                keepIdleModels: true,\r\n                // passed in to the create() method\r\n                createData: {\r\n                    compilerOptions: this._defaults.getCompilerOptions(),\r\n                    extraLibs: this._defaults.getExtraLibs(),\r\n                    customWorkerPath: this._defaults.workerOptions.customWorkerPath\r\n                }\r\n            });\r\n            var p = this._worker.getProxy();\r\n            if (this._defaults.getEagerModelSync()) {\r\n                p = p.then(function (worker) {\r\n                    if (_this._worker) {\r\n                        return _this._worker.withSyncedResources(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModels()\r\n                            .filter(function (model) { return model.getModeId() === _this._modeId; })\r\n                            .map(function (model) { return model.uri; }));\r\n                    }\r\n                    return worker;\r\n                });\r\n            }\r\n            this._client = p;\r\n        }\r\n        return this._client;\r\n    };\r\n    WorkerManager.prototype.getLanguageServiceWorker = function () {\r\n        var _this = this;\r\n        var resources = [];\r\n        for (var _i = 0; _i < arguments.length; _i++) {\r\n            resources[_i] = arguments[_i];\r\n        }\r\n        var _client;\r\n        return this._getClient()\r\n            .then(function (client) {\r\n            _client = client;\r\n        })\r\n            .then(function (_) {\r\n            if (_this._worker) {\r\n                return _this._worker.withSyncedResources(resources);\r\n            }\r\n        })\r\n            .then(function (_) { return _client; });\r\n    };\r\n    return WorkerManager;\r\n}());\r\n\r\n\n\n//# sourceURL=webpack://browser-esm-webpack/./node_modules/monaco-editor/esm/vs/language/typescript/workerManager.js?");

/***/ })

}]);