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AA+B0E,IAC5E,IAAI,EAAoCsE,EAAU/I,EAAUD,EAAQ0E,GAC7DA,CACX,C","sources":["webpack://web/../../node_modules/monaco-editor/esm/vs/language/typescript/languageFeatures.js","webpack://web/../../node_modules/monaco-editor/esm/vs/language/typescript/workerManager.js","webpack://web/../../node_modules/monaco-editor/esm/vs/language/typescript/lib/lib.index.js","webpack://web/../../node_modules/monaco-editor/esm/vs/language/typescript/tsMode.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\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'use strict';\r\nvar __extends = (this && this.__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 = (this && this.__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 = (this && this.__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\nimport { typescriptDefaults } from './monaco.contribution.js';\r\nimport { libFileSet } from './lib/lib.index.js';\r\nimport { editor, languages, Uri, Range, MarkerTag, MarkerSeverity } from './fillers/monaco-editor-core.js';\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\nexport function 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\nexport { Adapter };\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 !!libFileSet[uri.path.slice(1)];\r\n }\r\n return false;\r\n };\r\n LibFiles.prototype.getOrCreateModel = function (uri) {\r\n var model = editor.getModel(uri);\r\n if (model) {\r\n return model;\r\n }\r\n if (this.isLibFile(uri) && this._hasFetchedLibFiles) {\r\n return 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\nexport { LibFiles };\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 maybeValidate = function () {\r\n var onlyVisible = _this._defaults.getDiagnosticsOptions().onlyVisible;\r\n if (onlyVisible) {\r\n if (model.isAttachedToEditor()) {\r\n _this._doValidate(model);\r\n }\r\n }\r\n else {\r\n _this._doValidate(model);\r\n }\r\n };\r\n var handle;\r\n var changeSubscription = model.onDidChangeContent(function () {\r\n clearTimeout(handle);\r\n handle = setTimeout(maybeValidate, 500);\r\n });\r\n var visibleSubscription = model.onDidChangeAttached(function () {\r\n var onlyVisible = _this._defaults.getDiagnosticsOptions().onlyVisible;\r\n if (onlyVisible) {\r\n if (model.isAttachedToEditor()) {\r\n // this model is now attached to an editor\r\n // => compute diagnostics\r\n maybeValidate();\r\n }\r\n else {\r\n // this model is no longer attached to an editor\r\n // => clear existing diagnostics\r\n editor.setModelMarkers(model, _this._selector, []);\r\n }\r\n }\r\n });\r\n _this._listener[model.uri.toString()] = {\r\n dispose: function () {\r\n changeSubscription.dispose();\r\n visibleSubscription.dispose();\r\n clearTimeout(handle);\r\n }\r\n };\r\n maybeValidate();\r\n };\r\n var onModelRemoved = function (model) {\r\n 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(editor.onDidCreateModel(function (model) { return onModelAdd(model); }));\r\n _this._disposables.push(editor.onWillDisposeModel(onModelRemoved));\r\n _this._disposables.push(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 = 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 = 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 editor.getModels().forEach(function (model) { return onModelAdd(model); });\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 ? 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 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(MarkerTag.Unnecessary);\r\n }\r\n if (diag.reportsDeprecated) {\r\n tags.push(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 = 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 MarkerSeverity.Error;\r\n case DiagnosticCategory.Message:\r\n return MarkerSeverity.Info;\r\n case DiagnosticCategory.Warning:\r\n return MarkerSeverity.Warning;\r\n case DiagnosticCategory.Suggestion:\r\n return MarkerSeverity.Hint;\r\n }\r\n return MarkerSeverity.Info;\r\n };\r\n return DiagnosticsAdapter;\r\n}(Adapter));\r\nexport { DiagnosticsAdapter };\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 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 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(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 languages.CompletionItemKind.Keyword;\r\n case Kind.variable:\r\n case Kind.localVariable:\r\n return languages.CompletionItemKind.Variable;\r\n case Kind.memberVariable:\r\n case Kind.memberGetAccessor:\r\n case Kind.memberSetAccessor:\r\n return 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 languages.CompletionItemKind.Function;\r\n case Kind.enum:\r\n return languages.CompletionItemKind.Enum;\r\n case Kind.module:\r\n return languages.CompletionItemKind.Module;\r\n case Kind.class:\r\n return languages.CompletionItemKind.Class;\r\n case Kind.interface:\r\n return languages.CompletionItemKind.Interface;\r\n case Kind.warning:\r\n return languages.CompletionItemKind.File;\r\n }\r\n return 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\nexport { SuggestAdapter };\r\nfunction tagToString(tag) {\r\n var tagLabel = \"*@\" + tag.name + \"*\";\r\n if (tag.name === 'param' && tag.text) {\r\n var _a = tag.text, paramName = _a[0], rest = _a.slice(1);\r\n tagLabel += \"`\" + paramName.text + \"`\";\r\n if (rest.length > 0)\r\n tagLabel += \" \\u2014 \" + rest.map(function (r) { return r.text; }).join(' ');\r\n }\r\n else if (Array.isArray(tag.text)) {\r\n tagLabel += \" \\u2014 \" + tag.text.map(function (r) { return r.text; }).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 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 languages.SignatureHelpTriggerKind.ContentChange:\r\n return context.isRetrigger ? { kind: 'retrigger' } : { kind: 'invoked' };\r\n case 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\nexport { SignatureHelpAdapter };\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\nexport { QuickInfoAdapter };\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 ? languages.DocumentHighlightKind.Write\r\n : languages.DocumentHighlightKind.Text\r\n };\r\n })];\r\n }\r\n });\r\n });\r\n };\r\n return OccurrencesAdapter;\r\n}(Adapter));\r\nexport { OccurrencesAdapter };\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, matchedLibFile, libModel;\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 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 = 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 else {\r\n matchedLibFile = typescriptDefaults.getExtraLibs()[entry.fileName];\r\n if (matchedLibFile) {\r\n libModel = editor.createModel(matchedLibFile.content, 'typescript', uri);\r\n return [2 /*return*/, {\r\n uri: uri,\r\n range: this._textSpanToRange(libModel, entry.textSpan)\r\n }];\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\nexport { DefinitionAdapter };\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 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 = 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\nexport { ReferenceAdapter };\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] || 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 };\r\n if (containerLabel)\r\n result.containerName = containerLabel;\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\nexport { OutlineAdapter };\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\nexport { Kind };\r\nvar outlineTypeTable = Object.create(null);\r\noutlineTypeTable[Kind.module] = languages.SymbolKind.Module;\r\noutlineTypeTable[Kind.class] = languages.SymbolKind.Class;\r\noutlineTypeTable[Kind.enum] = languages.SymbolKind.Enum;\r\noutlineTypeTable[Kind.interface] = languages.SymbolKind.Interface;\r\noutlineTypeTable[Kind.memberFunction] = languages.SymbolKind.Method;\r\noutlineTypeTable[Kind.memberVariable] = languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.memberGetAccessor] = languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.memberSetAccessor] = languages.SymbolKind.Property;\r\noutlineTypeTable[Kind.variable] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.const] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.localVariable] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.variable] = languages.SymbolKind.Variable;\r\noutlineTypeTable[Kind.function] = languages.SymbolKind.Function;\r\noutlineTypeTable[Kind.localFunction] = 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\nexport { FormatHelper };\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\nexport { FormatAdapter };\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\nexport { FormatOnTypeAdapter };\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\nexport { CodeActionAdaptor };\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 = Uri.parse(renameLocation.fileName);\r\n model_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\nexport { RenameAdapter };\r\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'use strict';\r\nvar __awaiter = (this && this.__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 = (this && this.__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\nimport { editor } from './fillers/monaco-editor-core.js';\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 = 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(editor\r\n .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\nexport { WorkerManager };\r\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\nexport var 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.es2021.d.ts'] = true;\r\nlibFileSet['lib.es2021.full.d.ts'] = true;\r\nlibFileSet['lib.es2021.promise.d.ts'] = true;\r\nlibFileSet['lib.es2021.string.d.ts'] = true;\r\nlibFileSet['lib.es2021.weakref.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","/*---------------------------------------------------------------------------------------------\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'use strict';\r\nimport { WorkerManager } from './workerManager.js';\r\nimport * as languageFeatures from './languageFeatures.js';\r\nimport { languages } from './fillers/monaco-editor-core.js';\r\nvar javaScriptWorker;\r\nvar typeScriptWorker;\r\nexport function setupTypeScript(defaults) {\r\n typeScriptWorker = setupMode(defaults, 'typescript');\r\n}\r\nexport function setupJavaScript(defaults) {\r\n javaScriptWorker = setupMode(defaults, 'javascript');\r\n}\r\nexport function 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\nexport function 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(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.LibFiles(worker);\r\n languages.registerCompletionItemProvider(modeId, new languageFeatures.SuggestAdapter(worker));\r\n languages.registerSignatureHelpProvider(modeId, new languageFeatures.SignatureHelpAdapter(worker));\r\n languages.registerHoverProvider(modeId, new languageFeatures.QuickInfoAdapter(worker));\r\n languages.registerDocumentHighlightProvider(modeId, new languageFeatures.OccurrencesAdapter(worker));\r\n languages.registerDefinitionProvider(modeId, new languageFeatures.DefinitionAdapter(libFiles, worker));\r\n languages.registerReferenceProvider(modeId, new languageFeatures.ReferenceAdapter(libFiles, worker));\r\n languages.registerDocumentSymbolProvider(modeId, new languageFeatures.OutlineAdapter(worker));\r\n languages.registerDocumentRangeFormattingEditProvider(modeId, new languageFeatures.FormatAdapter(worker));\r\n languages.registerOnTypeFormattingEditProvider(modeId, new languageFeatures.FormatOnTypeAdapter(worker));\r\n languages.registerCodeActionProvider(modeId, new languageFeatures.CodeActionAdaptor(worker));\r\n languages.registerRenameProvider(modeId, new languageFeatures.RenameAdapter(worker));\r\n new languageFeatures.DiagnosticsAdapter(libFiles, defaults, modeId, worker);\r\n return worker;\r\n}\r\n"],"names":["extendStatics","IndentStyle","WorkerManager","modeId","defaults","_this","this","_modeId","_defaults","_worker","_client","_configChangeListener","onDidChange","_stopWorker","_updateExtraLibsToken","_extraLibsChangeListener","onDidExtraLibsChange","_updateExtraLibs","prototype","dispose","thisArg","_arguments","generator","myToken","proxy","body","f","y","t","g","_","label","sent","trys","ops","next","verb","Symbol","iterator","n","v","op","TypeError","call","done","value","pop","length","push","e","step","__generator","_a","getProxy","updateExtraLibs","getExtraLibs","P","Promise","resolve","reject","fulfilled","rejected","result","then","apply","_getClient","createWebWorker","moduleId","keepIdleModels","createData","compilerOptions","getCompilerOptions","extraLibs","customWorkerPath","workerOptions","p","getEagerModelSync","worker","withSyncedResources","getModels","filter","model","getModeId","map","uri","getLanguageServiceWorker","resources","_i","arguments","client","libFileSet","__extends","d","b","Object","setPrototypeOf","__proto__","Array","hasOwnProperty","String","__","constructor","create","flattenDiagnosticMessageText","diag","newLine","indent","undefined","i","messageText","displayPartsToString","displayParts","displayPart","text","join","DiagnosticCategory","Adapter","_textSpanToRange","span","p1","getPositionAt","start","p2","startLineNumber","lineNumber","startColumn","column","endLineNumber","endColumn","LibFiles","_libFiles","_hasFetchedLibFiles","_fetchLibFilesPromise","isLibFile","path","indexOf","slice","getOrCreateModel","getModel","createModel","_containsLibFile","uris","uris_1","fetchLibFilesIfNecessary","_fetchLibFiles","w","getLibFiles","libFiles","DiagnosticsAdapter","_super","_selector","_disposables","_listener","onModelAdd","handle","maybeValidate","getDiagnosticsOptions","onlyVisible","isAttachedToEditor","_doValidate","changeSubscription","onDidChangeContent","clearTimeout","setTimeout","visibleSubscription","onDidChangeAttached","setModelMarkers","toString","onModelRemoved","key","onDidCreateModel","onWillDisposeModel","onDidChangeModelLanguage","event","recomputeDiagostics","forEach","promises","noSyntaxValidation","noSemanticValidation","noSuggestionDiagnostics","allDiagnostics","diagnostics","relatedUris","_b","isDisposed","getSyntacticDiagnostics","getSemanticDiagnostics","getSuggestionDiagnostics","all","reduce","c","concat","diagnosticCodesToIgnore","code","relatedInformation","file","parse","fileName","_convertDiagnostics","diagStart","diagLength","tags","reportsUnnecessary","Unnecessary","reportsDeprecated","Deprecated","severity","_tsDiagnosticCategoryToMarkerSeverity","category","message","_convertRelatedInformation","info","relatedResource","relatedResourceUri","infoStart","infoLength","resource","Error","Message","Info","Warning","Suggestion","Hint","SuggestAdapter","defineProperty","get","enumerable","configurable","provideCompletionItems","position","_context","token","wordInfo","wordRange","offset","suggestions","getWordUntilPosition","getOffsetAt","getCompletionsAtPosition","entries","entry","range","replacementSpan","kindModifiers","CompletionItemTag","name","insertText","sortText","kind","convertKind","resolveCompletionItem","item","myItem","details","getCompletionEntryDetails","detail","documentation","createDocumentationString","Kind","primitiveType","keyword","CompletionItemKind","Keyword","variable","localVariable","Variable","memberVariable","memberGetAccessor","memberSetAccessor","Field","function","memberFunction","constructSignature","callSignature","indexSignature","Function","enum","Enum","module","Module","class","Class","interface","Interface","warning","File","Property","documentationString","tagToString","tag","tagLabel","paramName","rest","r","isArray","SignatureHelpAdapter","signatureHelpTriggerCharacters","_toSignatureHelpTriggerReason","context","triggerKind","SignatureHelpTriggerKind","TriggerCharacter","triggerCharacter","isRetrigger","ContentChange","Invoke","provideSignatureHelp","ret","getSignatureHelpItems","triggerReason","activeSignature","selectedItemIndex","activeParameter","argumentIndex","signatures","items","signature","parameters","prefixDisplayParts","a","parameter","separatorDisplayParts","suffixDisplayParts","QuickInfoAdapter","provideHover","contents","getQuickInfoAtPosition","textSpan","OccurrencesAdapter","provideDocumentHighlights","getOccurrencesAtPosition","isWriteAccess","DocumentHighlightKind","Write","Text","DefinitionAdapter","provideDefinition","entries_1","refModel","matchedLibFile","libModel","getDefinitionAtPosition","content","ReferenceAdapter","provideReferences","entries_2","getReferencesAtPosition","OutlineAdapter","provideDocumentSymbols","convert","getNavigationBarItems","bucket","containerLabel","outlineTypeTable","SymbolKind","spans","selectionRange","containerName","childItems","child","unknown","script","type","localFunction","constructorImplementation","typeParameter","alias","const","let","Method","javaScriptWorker","typeScriptWorker","FormatHelper","_convertOptions","options","ConvertTabsToSpaces","insertSpaces","TabSize","tabSize","IndentSize","Smart","NewLineCharacter","InsertSpaceAfterCommaDelimiter","InsertSpaceAfterSemicolonInForStatements","InsertSpaceBeforeAndAfterBinaryOperators","InsertSpaceAfterKeywordsInControlFlowStatements","InsertSpaceAfterFunctionKeywordForAnonymousFunctions","InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis","InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets","InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces","PlaceOpenBraceOnNewLineForControlBlocks","PlaceOpenBraceOnNewLineForFunctions","_convertTextChanges","change","newText","FormatAdapter","provideDocumentRangeFormattingEdits","startOffset","endOffset","edits","getFormattingEditsForRange","edit","FormatOnTypeAdapter","provideOnTypeFormattingEdits","ch","getFormattingEditsAfterKeystroke","CodeActionAdaptor","provideCodeActions","end","formatOptions","errorCodes","codeFixes","getOptions","markers","m","Number","getCodeFixesAtPosition","actions","fix","changes","isNewFile","_tsCodeFixActionToMonacoCodeAction","codeFix","_c","textChanges","textChange","title","description","RenameAdapter","provideRenameEdits","newName","renameInfo","renameLocations","renameLocations_1","renameLocation","resource_1","model_1","getRenameInfo","allowRenameOfImportPath","canRename","rejectReason","localizedErrorMessage","fileToRename","findRenameLocations","setupTypeScript","setupMode","setupJavaScript","getJavaScriptWorker","getTypeScriptWorker","registerCompletionItemProvider","registerSignatureHelpProvider","registerHoverProvider","registerDocumentHighlightProvider","registerDefinitionProvider","registerReferenceProvider","registerDocumentSymbolProvider","registerDocumentRangeFormattingEditProvider","registerOnTypeFormattingEditProvider","registerCodeActionProvider","registerRenameProvider"],"sourceRoot":""} |