webpackJsonp([62],{ /***/ 1021: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["g"] = isThenable; /* harmony export (immutable) */ __webpack_exports__["e"] = createCancelablePromise; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Delayer; }); /* harmony export (immutable) */ __webpack_exports__["h"] = timeout; /* harmony export (immutable) */ __webpack_exports__["f"] = disposableTimeout; /* unused harmony export first */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return TimeoutTimer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return IntervalTimer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return RunOnceScheduler; }); /* unused harmony export runWhenIdle */ /* unused harmony export IdleValue */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cancellation_js__ = __webpack_require__(1678); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__errors_js__ = __webpack_require__(956); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__lifecycle_js__ = __webpack_require__(825); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); function isThenable(obj) { return obj && typeof obj.then === 'function'; } function createCancelablePromise(callback) { var source = new __WEBPACK_IMPORTED_MODULE_0__cancellation_js__["a" /* CancellationTokenSource */](); var thenable = callback(source.token); var promise = new Promise(function (resolve, reject) { source.token.onCancellationRequested(function () { reject(__WEBPACK_IMPORTED_MODULE_1__errors_js__["a" /* canceled */]()); }); Promise.resolve(thenable).then(function (value) { source.dispose(); resolve(value); }, function (err) { source.dispose(); reject(err); }); }); return new /** @class */ (function () { function class_1() { } class_1.prototype.cancel = function () { source.cancel(); }; class_1.prototype.then = function (resolve, reject) { return promise.then(resolve, reject); }; class_1.prototype.catch = function (reject) { return this.then(undefined, reject); }; class_1.prototype.finally = function (onfinally) { return promise.finally(onfinally); }; return class_1; }()); } /** * A helper to delay execution of a task that is being requested often. * * Following the throttler, now imagine the mail man wants to optimize the number of * trips proactively. The trip itself can be long, so he decides not to make the trip * as soon as a letter is submitted. Instead he waits a while, in case more * letters are submitted. After said waiting period, if no letters were submitted, he * decides to make the trip. Imagine that N more letters were submitted after the first * one, all within a short period of time between each other. Even though N+1 * submissions occurred, only 1 delivery was made. * * The delayer offers this behavior via the trigger() method, into which both the task * to be executed and the waiting period (delay) must be passed in as arguments. Following * the example: * * const delayer = new Delayer(WAITING_PERIOD); * const letters = []; * * function letterReceived(l) { * letters.push(l); * delayer.trigger(() => { return makeTheTrip(); }); * } */ var Delayer = /** @class */ (function () { function Delayer(defaultDelay) { this.defaultDelay = defaultDelay; this.timeout = null; this.completionPromise = null; this.doResolve = null; this.task = null; } Delayer.prototype.trigger = function (task, delay) { var _this = this; if (delay === void 0) { delay = this.defaultDelay; } this.task = task; this.cancelTimeout(); if (!this.completionPromise) { this.completionPromise = new Promise(function (c, e) { _this.doResolve = c; _this.doReject = e; }).then(function () { _this.completionPromise = null; _this.doResolve = null; var task = _this.task; _this.task = null; return task(); }); } this.timeout = setTimeout(function () { _this.timeout = null; _this.doResolve(null); }, delay); return this.completionPromise; }; Delayer.prototype.isTriggered = function () { return this.timeout !== null; }; Delayer.prototype.cancel = function () { this.cancelTimeout(); if (this.completionPromise) { this.doReject(__WEBPACK_IMPORTED_MODULE_1__errors_js__["a" /* canceled */]()); this.completionPromise = null; } }; Delayer.prototype.cancelTimeout = function () { if (this.timeout !== null) { clearTimeout(this.timeout); this.timeout = null; } }; Delayer.prototype.dispose = function () { this.cancelTimeout(); }; return Delayer; }()); function timeout(millis, token) { if (!token) { return createCancelablePromise(function (token) { return timeout(millis, token); }); } return new Promise(function (resolve, reject) { var handle = setTimeout(resolve, millis); token.onCancellationRequested(function () { clearTimeout(handle); reject(__WEBPACK_IMPORTED_MODULE_1__errors_js__["a" /* canceled */]()); }); }); } function disposableTimeout(handler, timeout) { if (timeout === void 0) { timeout = 0; } var timer = setTimeout(handler, timeout); return Object(__WEBPACK_IMPORTED_MODULE_2__lifecycle_js__["e" /* toDisposable */])(function () { return clearTimeout(timer); }); } function first(promiseFactories, shouldStop, defaultValue) { if (shouldStop === void 0) { shouldStop = function (t) { return !!t; }; } if (defaultValue === void 0) { defaultValue = null; } var index = 0; var len = promiseFactories.length; var loop = function () { if (index >= len) { return Promise.resolve(defaultValue); } var factory = promiseFactories[index++]; var promise = Promise.resolve(factory()); return promise.then(function (result) { if (shouldStop(result)) { return Promise.resolve(result); } return loop(); }); }; return loop(); } var TimeoutTimer = /** @class */ (function (_super) { __extends(TimeoutTimer, _super); function TimeoutTimer(runner, timeout) { var _this = _super.call(this) || this; _this._token = -1; if (typeof runner === 'function' && typeof timeout === 'number') { _this.setIfNotSet(runner, timeout); } return _this; } TimeoutTimer.prototype.dispose = function () { this.cancel(); _super.prototype.dispose.call(this); }; TimeoutTimer.prototype.cancel = function () { if (this._token !== -1) { clearTimeout(this._token); this._token = -1; } }; TimeoutTimer.prototype.cancelAndSet = function (runner, timeout) { var _this = this; this.cancel(); this._token = setTimeout(function () { _this._token = -1; runner(); }, timeout); }; TimeoutTimer.prototype.setIfNotSet = function (runner, timeout) { var _this = this; if (this._token !== -1) { // timer is already set return; } this._token = setTimeout(function () { _this._token = -1; runner(); }, timeout); }; return TimeoutTimer; }(__WEBPACK_IMPORTED_MODULE_2__lifecycle_js__["a" /* Disposable */])); var IntervalTimer = /** @class */ (function (_super) { __extends(IntervalTimer, _super); function IntervalTimer() { var _this = _super.call(this) || this; _this._token = -1; return _this; } IntervalTimer.prototype.dispose = function () { this.cancel(); _super.prototype.dispose.call(this); }; IntervalTimer.prototype.cancel = function () { if (this._token !== -1) { clearInterval(this._token); this._token = -1; } }; IntervalTimer.prototype.cancelAndSet = function (runner, interval) { this.cancel(); this._token = setInterval(function () { runner(); }, interval); }; return IntervalTimer; }(__WEBPACK_IMPORTED_MODULE_2__lifecycle_js__["a" /* Disposable */])); var RunOnceScheduler = /** @class */ (function () { function RunOnceScheduler(runner, timeout) { this.timeoutToken = -1; this.runner = runner; this.timeout = timeout; this.timeoutHandler = this.onTimeout.bind(this); } /** * Dispose RunOnceScheduler */ RunOnceScheduler.prototype.dispose = function () { this.cancel(); this.runner = null; }; /** * Cancel current scheduled runner (if any). */ RunOnceScheduler.prototype.cancel = function () { if (this.isScheduled()) { clearTimeout(this.timeoutToken); this.timeoutToken = -1; } }; /** * Cancel previous runner (if any) & schedule a new runner. */ RunOnceScheduler.prototype.schedule = function (delay) { if (delay === void 0) { delay = this.timeout; } this.cancel(); this.timeoutToken = setTimeout(this.timeoutHandler, delay); }; /** * Returns true if scheduled. */ RunOnceScheduler.prototype.isScheduled = function () { return this.timeoutToken !== -1; }; RunOnceScheduler.prototype.onTimeout = function () { this.timeoutToken = -1; if (this.runner) { this.doRun(); } }; RunOnceScheduler.prototype.doRun = function () { if (this.runner) { this.runner(); } }; return RunOnceScheduler; }()); /** * Execute the callback the next time the browser is idle */ var runWhenIdle; (function () { if (typeof requestIdleCallback !== 'function' || typeof cancelIdleCallback !== 'function') { var dummyIdle_1 = Object.freeze({ didTimeout: true, timeRemaining: function () { return 15; } }); runWhenIdle = function (runner) { var handle = setTimeout(function () { return runner(dummyIdle_1); }); var disposed = false; return { dispose: function () { if (disposed) { return; } disposed = true; clearTimeout(handle); } }; }; } else { runWhenIdle = function (runner, timeout) { var handle = requestIdleCallback(runner, typeof timeout === 'number' ? { timeout: timeout } : undefined); var disposed = false; return { dispose: function () { if (disposed) { return; } disposed = true; cancelIdleCallback(handle); } }; }; } })(); /** * An implementation of the "idle-until-urgent"-strategy as introduced * here: https://philipwalton.com/articles/idle-until-urgent/ */ var IdleValue = /** @class */ (function () { function IdleValue(executor) { var _this = this; this._executor = function () { try { _this._value = executor(); } catch (err) { _this._error = err; } finally { _this._didRun = true; } }; this._handle = runWhenIdle(function () { return _this._executor(); }); } IdleValue.prototype.dispose = function () { this._handle.dispose(); }; IdleValue.prototype.getValue = function () { if (!this._didRun) { this._handle.dispose(); this._executor(); } if (this._error) { throw this._error; } return this._value; }; return IdleValue; }()); //#endregion /***/ }), /***/ 1044: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return LanguageIdentifier; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return TokenMetadata; }); /* unused harmony export completionKindToCssClass */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return completionKindFromLegacyString; }); /* unused harmony export SignatureHelpTriggerKind */ /* unused harmony export DocumentHighlightKind */ /* unused harmony export isLocationLink */ /* unused harmony export symbolKindToCssClass */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return FoldingRangeKind; }); /* harmony export (immutable) */ __webpack_exports__["y"] = isResourceTextEdit; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return ReferenceProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return RenameProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CompletionProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return SignatureHelpProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return HoverProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return DocumentSymbolProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return DocumentHighlightProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return DefinitionProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return DeclarationProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return ImplementationProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return TypeDefinitionProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CodeLensProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CodeActionProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return DocumentFormattingEditProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return DocumentRangeFormattingEditProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return OnTypeFormattingEditProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return LinkProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ColorProviderRegistry; }); /* unused harmony export SelectionRangeRegistry */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return FoldingRangeProviderRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return TokenizationRegistry; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_types_js__ = __webpack_require__(1057); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_uri_js__ = __webpack_require__(1278); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_range_js__ = __webpack_require__(846); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__ = __webpack_require__(1895); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__modes_tokenizationRegistry_js__ = __webpack_require__(1897); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ /** * @internal */ var LanguageIdentifier = /** @class */ (function () { function LanguageIdentifier(language, id) { this.language = language; this.id = id; } return LanguageIdentifier; }()); /** * @internal */ var TokenMetadata = /** @class */ (function () { function TokenMetadata() { } TokenMetadata.getLanguageId = function (metadata) { return (metadata & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */; }; TokenMetadata.getTokenType = function (metadata) { return (metadata & 1792 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */; }; TokenMetadata.getFontStyle = function (metadata) { return (metadata & 14336 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */; }; TokenMetadata.getForeground = function (metadata) { return (metadata & 8372224 /* FOREGROUND_MASK */) >>> 14 /* FOREGROUND_OFFSET */; }; TokenMetadata.getBackground = function (metadata) { return (metadata & 4286578688 /* BACKGROUND_MASK */) >>> 23 /* BACKGROUND_OFFSET */; }; TokenMetadata.getClassNameFromMetadata = function (metadata) { var foreground = this.getForeground(metadata); var className = 'mtk' + foreground; var fontStyle = this.getFontStyle(metadata); if (fontStyle & 1 /* Italic */) { className += ' mtki'; } if (fontStyle & 2 /* Bold */) { className += ' mtkb'; } if (fontStyle & 4 /* Underline */) { className += ' mtku'; } return className; }; TokenMetadata.getInlineStyleFromMetadata = function (metadata, colorMap) { var foreground = this.getForeground(metadata); var fontStyle = this.getFontStyle(metadata); var result = "color: " + colorMap[foreground] + ";"; if (fontStyle & 1 /* Italic */) { result += 'font-style: italic;'; } if (fontStyle & 2 /* Bold */) { result += 'font-weight: bold;'; } if (fontStyle & 4 /* Underline */) { result += 'text-decoration: underline;'; } return result; }; return TokenMetadata; }()); /** * @internal */ var completionKindToCssClass = (function () { var data = Object.create(null); data[0 /* Method */] = 'method'; data[1 /* Function */] = 'function'; data[2 /* Constructor */] = 'constructor'; data[3 /* Field */] = 'field'; data[4 /* Variable */] = 'variable'; data[5 /* Class */] = 'class'; data[6 /* Struct */] = 'struct'; data[7 /* Interface */] = 'interface'; data[8 /* Module */] = 'module'; data[9 /* Property */] = 'property'; data[10 /* Event */] = 'event'; data[11 /* Operator */] = 'operator'; data[12 /* Unit */] = 'unit'; data[13 /* Value */] = 'value'; data[14 /* Constant */] = 'constant'; data[15 /* Enum */] = 'enum'; data[16 /* EnumMember */] = 'enum-member'; data[17 /* Keyword */] = 'keyword'; data[25 /* Snippet */] = 'snippet'; data[18 /* Text */] = 'text'; data[19 /* Color */] = 'color'; data[20 /* File */] = 'file'; data[21 /* Reference */] = 'reference'; data[22 /* Customcolor */] = 'customcolor'; data[23 /* Folder */] = 'folder'; data[24 /* TypeParameter */] = 'type-parameter'; return function (kind) { return data[kind] || 'property'; }; })(); /** * @internal */ var completionKindFromLegacyString = (function () { var data = Object.create(null); data['method'] = 0 /* Method */; data['function'] = 1 /* Function */; data['constructor'] = 2 /* Constructor */; data['field'] = 3 /* Field */; data['variable'] = 4 /* Variable */; data['class'] = 5 /* Class */; data['struct'] = 6 /* Struct */; data['interface'] = 7 /* Interface */; data['module'] = 8 /* Module */; data['property'] = 9 /* Property */; data['event'] = 10 /* Event */; data['operator'] = 11 /* Operator */; data['unit'] = 12 /* Unit */; data['value'] = 13 /* Value */; data['constant'] = 14 /* Constant */; data['enum'] = 15 /* Enum */; data['enum-member'] = 16 /* EnumMember */; data['keyword'] = 17 /* Keyword */; data['snippet'] = 25 /* Snippet */; data['text'] = 18 /* Text */; data['color'] = 19 /* Color */; data['file'] = 20 /* File */; data['reference'] = 21 /* Reference */; data['customcolor'] = 22 /* Customcolor */; data['folder'] = 23 /* Folder */; data['type-parameter'] = 24 /* TypeParameter */; return function (value) { return data[value] || 'property'; }; })(); var SignatureHelpTriggerKind; (function (SignatureHelpTriggerKind) { SignatureHelpTriggerKind[SignatureHelpTriggerKind["Invoke"] = 1] = "Invoke"; SignatureHelpTriggerKind[SignatureHelpTriggerKind["TriggerCharacter"] = 2] = "TriggerCharacter"; SignatureHelpTriggerKind[SignatureHelpTriggerKind["ContentChange"] = 3] = "ContentChange"; })(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {})); /** * A document highlight kind. */ var DocumentHighlightKind; (function (DocumentHighlightKind) { /** * A textual occurrence. */ DocumentHighlightKind[DocumentHighlightKind["Text"] = 0] = "Text"; /** * Read-access of a symbol, like reading a variable. */ DocumentHighlightKind[DocumentHighlightKind["Read"] = 1] = "Read"; /** * Write-access of a symbol, like writing to a variable. */ DocumentHighlightKind[DocumentHighlightKind["Write"] = 2] = "Write"; })(DocumentHighlightKind || (DocumentHighlightKind = {})); /** * @internal */ function isLocationLink(thing) { return thing && __WEBPACK_IMPORTED_MODULE_1__base_common_uri_js__["a" /* URI */].isUri(thing.uri) && __WEBPACK_IMPORTED_MODULE_2__core_range_js__["a" /* Range */].isIRange(thing.range) && (__WEBPACK_IMPORTED_MODULE_2__core_range_js__["a" /* Range */].isIRange(thing.originSelectionRange) || __WEBPACK_IMPORTED_MODULE_2__core_range_js__["a" /* Range */].isIRange(thing.targetSelectionRange)); } /** * @internal */ var symbolKindToCssClass = (function () { var _fromMapping = Object.create(null); _fromMapping[0 /* File */] = 'file'; _fromMapping[1 /* Module */] = 'module'; _fromMapping[2 /* Namespace */] = 'namespace'; _fromMapping[3 /* Package */] = 'package'; _fromMapping[4 /* Class */] = 'class'; _fromMapping[5 /* Method */] = 'method'; _fromMapping[6 /* Property */] = 'property'; _fromMapping[7 /* Field */] = 'field'; _fromMapping[8 /* Constructor */] = 'constructor'; _fromMapping[9 /* Enum */] = 'enum'; _fromMapping[10 /* Interface */] = 'interface'; _fromMapping[11 /* Function */] = 'function'; _fromMapping[12 /* Variable */] = 'variable'; _fromMapping[13 /* Constant */] = 'constant'; _fromMapping[14 /* String */] = 'string'; _fromMapping[15 /* Number */] = 'number'; _fromMapping[16 /* Boolean */] = 'boolean'; _fromMapping[17 /* Array */] = 'array'; _fromMapping[18 /* Object */] = 'object'; _fromMapping[19 /* Key */] = 'key'; _fromMapping[20 /* Null */] = 'null'; _fromMapping[21 /* EnumMember */] = 'enum-member'; _fromMapping[22 /* Struct */] = 'struct'; _fromMapping[23 /* Event */] = 'event'; _fromMapping[24 /* Operator */] = 'operator'; _fromMapping[25 /* TypeParameter */] = 'type-parameter'; return function toCssClassName(kind, inline) { return "symbol-icon " + (inline ? 'inline' : 'block') + " " + (_fromMapping[kind] || 'property'); }; })(); var FoldingRangeKind = /** @class */ (function () { /** * Creates a new [FoldingRangeKind](#FoldingRangeKind). * * @param value of the kind. */ function FoldingRangeKind(value) { this.value = value; } /** * Kind for folding range representing a comment. The value of the kind is 'comment'. */ FoldingRangeKind.Comment = new FoldingRangeKind('comment'); /** * Kind for folding range representing a import. The value of the kind is 'imports'. */ FoldingRangeKind.Imports = new FoldingRangeKind('imports'); /** * Kind for folding range representing regions (for example marked by `#region`, `#endregion`). * The value of the kind is 'region'. */ FoldingRangeKind.Region = new FoldingRangeKind('region'); return FoldingRangeKind; }()); /** * @internal */ function isResourceTextEdit(thing) { return Object(__WEBPACK_IMPORTED_MODULE_0__base_common_types_js__["h" /* isObject */])(thing) && thing.resource && Array.isArray(thing.edits); } // --- feature registries ------ /** * @internal */ var ReferenceProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var RenameProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var CompletionProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var SignatureHelpProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var HoverProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var DocumentSymbolProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var DocumentHighlightProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var DefinitionProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var DeclarationProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var ImplementationProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var TypeDefinitionProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var CodeLensProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var CodeActionProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var DocumentFormattingEditProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var DocumentRangeFormattingEditProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var OnTypeFormattingEditProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var LinkProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var ColorProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var SelectionRangeRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var FoldingRangeProviderRegistry = new __WEBPACK_IMPORTED_MODULE_3__modes_languageFeatureRegistry_js__["a" /* LanguageFeatureRegistry */](); /** * @internal */ var TokenizationRegistry = new __WEBPACK_IMPORTED_MODULE_4__modes_tokenizationRegistry_js__["a" /* TokenizationRegistryImpl */](); /***/ }), /***/ 1057: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = isArray; /* harmony export (immutable) */ __webpack_exports__["i"] = isString; /* harmony export (immutable) */ __webpack_exports__["h"] = isObject; /* harmony export (immutable) */ __webpack_exports__["g"] = isNumber; /* harmony export (immutable) */ __webpack_exports__["d"] = isBoolean; /* harmony export (immutable) */ __webpack_exports__["j"] = isUndefined; /* harmony export (immutable) */ __webpack_exports__["k"] = isUndefinedOrNull; /* harmony export (immutable) */ __webpack_exports__["e"] = isEmptyObject; /* harmony export (immutable) */ __webpack_exports__["f"] = isFunction; /* harmony export (immutable) */ __webpack_exports__["l"] = validateConstraints; /* unused harmony export validateConstraint */ /* harmony export (immutable) */ __webpack_exports__["a"] = create; /* harmony export (immutable) */ __webpack_exports__["b"] = getAllPropertyNames; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var _typeof = { number: 'number', string: 'string', undefined: 'undefined', object: 'object', function: 'function' }; /** * @returns whether the provided parameter is a JavaScript Array or not. */ function isArray(array) { if (Array.isArray) { return Array.isArray(array); } if (array && typeof (array.length) === _typeof.number && array.constructor === Array) { return true; } return false; } /** * @returns whether the provided parameter is a JavaScript String or not. */ function isString(str) { if (typeof (str) === _typeof.string || str instanceof String) { return true; } return false; } /** * * @returns whether the provided parameter is of type `object` but **not** * `null`, an `array`, a `regexp`, nor a `date`. */ function isObject(obj) { // The method can't do a type cast since there are type (like strings) which // are subclasses of any put not positvely matched by the function. Hence type // narrowing results in wrong results. return typeof obj === _typeof.object && obj !== null && !Array.isArray(obj) && !(obj instanceof RegExp) && !(obj instanceof Date); } /** * In **contrast** to just checking `typeof` this will return `false` for `NaN`. * @returns whether the provided parameter is a JavaScript Number or not. */ function isNumber(obj) { if ((typeof (obj) === _typeof.number || obj instanceof Number) && !isNaN(obj)) { return true; } return false; } /** * @returns whether the provided parameter is a JavaScript Boolean or not. */ function isBoolean(obj) { return obj === true || obj === false; } /** * @returns whether the provided parameter is undefined. */ function isUndefined(obj) { return typeof (obj) === _typeof.undefined; } /** * @returns whether the provided parameter is undefined or null. */ function isUndefinedOrNull(obj) { return isUndefined(obj) || obj === null; } var hasOwnProperty = Object.prototype.hasOwnProperty; /** * @returns whether the provided parameter is an empty JavaScript Object or not. */ function isEmptyObject(obj) { if (!isObject(obj)) { return false; } for (var key in obj) { if (hasOwnProperty.call(obj, key)) { return false; } } return true; } /** * @returns whether the provided parameter is a JavaScript Function or not. */ function isFunction(obj) { return typeof obj === _typeof.function; } function validateConstraints(args, constraints) { var len = Math.min(args.length, constraints.length); for (var i = 0; i < len; i++) { validateConstraint(args[i], constraints[i]); } } function validateConstraint(arg, constraint) { if (isString(constraint)) { if (typeof arg !== constraint) { throw new Error("argument does not match constraint: typeof " + constraint); } } else if (isFunction(constraint)) { try { if (arg instanceof constraint) { return; } } catch (_a) { // ignore } if (!isUndefinedOrNull(arg) && arg.constructor === constraint) { return; } if (constraint.length === 1 && constraint.call(undefined, arg) === true) { return; } throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true"); } } /** * Creates a new object of the provided class and will call the constructor with * any additional argument supplied. */ function create(ctor) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } var _a; if (isNativeClass(ctor)) { return new ((_a = ctor).bind.apply(_a, [void 0].concat(args)))(); } else { var obj = Object.create(ctor.prototype); ctor.apply(obj, args); return obj; } } // https://stackoverflow.com/a/32235645/1499159 function isNativeClass(thing) { return typeof thing === 'function' && thing.hasOwnProperty('prototype') && !thing.hasOwnProperty('arguments'); } /** * * */ function getAllPropertyNames(obj) { var res = []; var proto = Object.getPrototypeOf(obj); while (Object.prototype !== proto) { res = res.concat(Object.getOwnPropertyNames(proto)); proto = Object.getPrototypeOf(proto); } return res; } /***/ }), /***/ 1078: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ViewPart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PartFingerprints; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_browser_fastDomNode_js__ = __webpack_require__(957); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_viewModel_viewEventHandler_js__ = __webpack_require__(1398); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var ViewPart = /** @class */ (function (_super) { __extends(ViewPart, _super); function ViewPart(context) { var _this = _super.call(this) || this; _this._context = context; _this._context.addEventHandler(_this); return _this; } ViewPart.prototype.dispose = function () { this._context.removeEventHandler(this); _super.prototype.dispose.call(this); }; return ViewPart; }(__WEBPACK_IMPORTED_MODULE_1__common_viewModel_viewEventHandler_js__["a" /* ViewEventHandler */])); var PartFingerprints = /** @class */ (function () { function PartFingerprints() { } PartFingerprints.write = function (target, partId) { if (target instanceof __WEBPACK_IMPORTED_MODULE_0__base_browser_fastDomNode_js__["a" /* FastDomNode */]) { target.setAttribute('data-mprt', String(partId)); } else { target.setAttribute('data-mprt', String(partId)); } }; PartFingerprints.read = function (target) { var r = target.getAttribute('data-mprt'); if (r === null) { return 0 /* None */; } return parseInt(r, 10); }; PartFingerprints.collect = function (child, stopAt) { var result = [], resultLen = 0; while (child && child !== document.body) { if (child === stopAt) { break; } if (child.nodeType === child.ELEMENT_NODE) { result[resultLen++] = this.read(child); } child = child.parentElement; } var r = new Uint8Array(resultLen); for (var i = 0; i < resultLen; i++) { r[i] = result[resultLen - i - 1]; } return r; }; return PartFingerprints; }()); /***/ }), /***/ 1091: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ContextKeyExpr; }); /* unused harmony export ContextKeyDefinedExpr */ /* unused harmony export ContextKeyEqualsExpr */ /* unused harmony export ContextKeyNotEqualsExpr */ /* unused harmony export ContextKeyNotExpr */ /* unused harmony export ContextKeyRegexExpr */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContextKeyAndExpr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return RawContextKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return IContextKeyService; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return SET_CONTEXT_COMMAND_ID; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_strings_js__ = __webpack_require__(847); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__instantiation_common_instantiation_js__ = __webpack_require__(855); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var ContextKeyExpr = /** @class */ (function () { function ContextKeyExpr() { } ContextKeyExpr.has = function (key) { return new ContextKeyDefinedExpr(key); }; ContextKeyExpr.equals = function (key, value) { return new ContextKeyEqualsExpr(key, value); }; ContextKeyExpr.regex = function (key, value) { return new ContextKeyRegexExpr(key, value); }; ContextKeyExpr.not = function (key) { return new ContextKeyNotExpr(key); }; ContextKeyExpr.and = function () { var expr = []; for (var _i = 0; _i < arguments.length; _i++) { expr[_i] = arguments[_i]; } return new ContextKeyAndExpr(expr); }; ContextKeyExpr.deserialize = function (serialized, strict) { var _this = this; if (strict === void 0) { strict = false; } if (!serialized) { return null; } var pieces = serialized.split('&&'); var result = new ContextKeyAndExpr(pieces.map(function (p) { return _this._deserializeOne(p, strict); })); return result.normalize(); }; ContextKeyExpr._deserializeOne = function (serializedOne, strict) { serializedOne = serializedOne.trim(); if (serializedOne.indexOf('!=') >= 0) { var pieces = serializedOne.split('!='); return new ContextKeyNotEqualsExpr(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); } if (serializedOne.indexOf('==') >= 0) { var pieces = serializedOne.split('=='); return new ContextKeyEqualsExpr(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); } if (serializedOne.indexOf('=~') >= 0) { var pieces = serializedOne.split('=~'); return new ContextKeyRegexExpr(pieces[0].trim(), this._deserializeRegexValue(pieces[1], strict)); } if (/^\!\s*/.test(serializedOne)) { return new ContextKeyNotExpr(serializedOne.substr(1).trim()); } return new ContextKeyDefinedExpr(serializedOne); }; ContextKeyExpr._deserializeValue = function (serializedValue, strict) { serializedValue = serializedValue.trim(); if (serializedValue === 'true') { return true; } if (serializedValue === 'false') { return false; } var m = /^'([^']*)'$/.exec(serializedValue); if (m) { return m[1].trim(); } return serializedValue; }; ContextKeyExpr._deserializeRegexValue = function (serializedValue, strict) { if (Object(__WEBPACK_IMPORTED_MODULE_0__base_common_strings_js__["r" /* isFalsyOrWhitespace */])(serializedValue)) { if (strict) { throw new Error('missing regexp-value for =~-expression'); } else { console.warn('missing regexp-value for =~-expression'); } return null; } var start = serializedValue.indexOf('/'); var end = serializedValue.lastIndexOf('/'); if (start === end || start < 0 /* || to < 0 */) { if (strict) { throw new Error("bad regexp-value '" + serializedValue + "', missing /-enclosure"); } else { console.warn("bad regexp-value '" + serializedValue + "', missing /-enclosure"); } return null; } var value = serializedValue.slice(start + 1, end); var caseIgnoreFlag = serializedValue[end + 1] === 'i' ? 'i' : ''; try { return new RegExp(value, caseIgnoreFlag); } catch (e) { if (strict) { throw new Error("bad regexp-value '" + serializedValue + "', parse error: " + e); } else { console.warn("bad regexp-value '" + serializedValue + "', parse error: " + e); } return null; } }; return ContextKeyExpr; }()); function cmp(a, b) { var aType = a.getType(); var bType = b.getType(); if (aType !== bType) { return aType - bType; } switch (aType) { case 1 /* Defined */: return a.cmp(b); case 2 /* Not */: return a.cmp(b); case 3 /* Equals */: return a.cmp(b); case 4 /* NotEquals */: return a.cmp(b); case 6 /* Regex */: return a.cmp(b); default: throw new Error('Unknown ContextKeyExpr!'); } } var ContextKeyDefinedExpr = /** @class */ (function () { function ContextKeyDefinedExpr(key) { this.key = key; } ContextKeyDefinedExpr.prototype.getType = function () { return 1 /* Defined */; }; ContextKeyDefinedExpr.prototype.cmp = function (other) { if (this.key < other.key) { return -1; } if (this.key > other.key) { return 1; } return 0; }; ContextKeyDefinedExpr.prototype.equals = function (other) { if (other instanceof ContextKeyDefinedExpr) { return (this.key === other.key); } return false; }; ContextKeyDefinedExpr.prototype.evaluate = function (context) { return (!!context.getValue(this.key)); }; ContextKeyDefinedExpr.prototype.normalize = function () { return this; }; ContextKeyDefinedExpr.prototype.keys = function () { return [this.key]; }; return ContextKeyDefinedExpr; }()); var ContextKeyEqualsExpr = /** @class */ (function () { function ContextKeyEqualsExpr(key, value) { this.key = key; this.value = value; } ContextKeyEqualsExpr.prototype.getType = function () { return 3 /* Equals */; }; ContextKeyEqualsExpr.prototype.cmp = function (other) { if (this.key < other.key) { return -1; } if (this.key > other.key) { return 1; } if (this.value < other.value) { return -1; } if (this.value > other.value) { return 1; } return 0; }; ContextKeyEqualsExpr.prototype.equals = function (other) { if (other instanceof ContextKeyEqualsExpr) { return (this.key === other.key && this.value === other.value); } return false; }; ContextKeyEqualsExpr.prototype.evaluate = function (context) { /* tslint:disable:triple-equals */ // Intentional == return (context.getValue(this.key) == this.value); /* tslint:enable:triple-equals */ }; ContextKeyEqualsExpr.prototype.normalize = function () { if (typeof this.value === 'boolean') { if (this.value) { return new ContextKeyDefinedExpr(this.key); } return new ContextKeyNotExpr(this.key); } return this; }; ContextKeyEqualsExpr.prototype.keys = function () { return [this.key]; }; return ContextKeyEqualsExpr; }()); var ContextKeyNotEqualsExpr = /** @class */ (function () { function ContextKeyNotEqualsExpr(key, value) { this.key = key; this.value = value; } ContextKeyNotEqualsExpr.prototype.getType = function () { return 4 /* NotEquals */; }; ContextKeyNotEqualsExpr.prototype.cmp = function (other) { if (this.key < other.key) { return -1; } if (this.key > other.key) { return 1; } if (this.value < other.value) { return -1; } if (this.value > other.value) { return 1; } return 0; }; ContextKeyNotEqualsExpr.prototype.equals = function (other) { if (other instanceof ContextKeyNotEqualsExpr) { return (this.key === other.key && this.value === other.value); } return false; }; ContextKeyNotEqualsExpr.prototype.evaluate = function (context) { /* tslint:disable:triple-equals */ // Intentional != return (context.getValue(this.key) != this.value); /* tslint:enable:triple-equals */ }; ContextKeyNotEqualsExpr.prototype.normalize = function () { if (typeof this.value === 'boolean') { if (this.value) { return new ContextKeyNotExpr(this.key); } return new ContextKeyDefinedExpr(this.key); } return this; }; ContextKeyNotEqualsExpr.prototype.keys = function () { return [this.key]; }; return ContextKeyNotEqualsExpr; }()); var ContextKeyNotExpr = /** @class */ (function () { function ContextKeyNotExpr(key) { this.key = key; } ContextKeyNotExpr.prototype.getType = function () { return 2 /* Not */; }; ContextKeyNotExpr.prototype.cmp = function (other) { if (this.key < other.key) { return -1; } if (this.key > other.key) { return 1; } return 0; }; ContextKeyNotExpr.prototype.equals = function (other) { if (other instanceof ContextKeyNotExpr) { return (this.key === other.key); } return false; }; ContextKeyNotExpr.prototype.evaluate = function (context) { return (!context.getValue(this.key)); }; ContextKeyNotExpr.prototype.normalize = function () { return this; }; ContextKeyNotExpr.prototype.keys = function () { return [this.key]; }; return ContextKeyNotExpr; }()); var ContextKeyRegexExpr = /** @class */ (function () { function ContextKeyRegexExpr(key, regexp) { this.key = key; this.regexp = regexp; // } ContextKeyRegexExpr.prototype.getType = function () { return 6 /* Regex */; }; ContextKeyRegexExpr.prototype.cmp = function (other) { if (this.key < other.key) { return -1; } if (this.key > other.key) { return 1; } var thisSource = this.regexp ? this.regexp.source : ''; var otherSource = other.regexp ? other.regexp.source : ''; if (thisSource < otherSource) { return -1; } if (thisSource > otherSource) { return 1; } return 0; }; ContextKeyRegexExpr.prototype.equals = function (other) { if (other instanceof ContextKeyRegexExpr) { var thisSource = this.regexp ? this.regexp.source : ''; var otherSource = other.regexp ? other.regexp.source : ''; return (this.key === other.key && thisSource === otherSource); } return false; }; ContextKeyRegexExpr.prototype.evaluate = function (context) { var value = context.getValue(this.key); return this.regexp ? this.regexp.test(value) : false; }; ContextKeyRegexExpr.prototype.normalize = function () { return this; }; ContextKeyRegexExpr.prototype.keys = function () { return [this.key]; }; return ContextKeyRegexExpr; }()); var ContextKeyAndExpr = /** @class */ (function () { function ContextKeyAndExpr(expr) { this.expr = ContextKeyAndExpr._normalizeArr(expr); } ContextKeyAndExpr.prototype.getType = function () { return 5 /* And */; }; ContextKeyAndExpr.prototype.equals = function (other) { if (other instanceof ContextKeyAndExpr) { if (this.expr.length !== other.expr.length) { return false; } for (var i = 0, len = this.expr.length; i < len; i++) { if (!this.expr[i].equals(other.expr[i])) { return false; } } return true; } return false; }; ContextKeyAndExpr.prototype.evaluate = function (context) { for (var i = 0, len = this.expr.length; i < len; i++) { if (!this.expr[i].evaluate(context)) { return false; } } return true; }; ContextKeyAndExpr._normalizeArr = function (arr) { var expr = []; if (arr) { for (var i = 0, len = arr.length; i < len; i++) { var e = arr[i]; if (!e) { continue; } e = e.normalize(); if (!e) { continue; } if (e instanceof ContextKeyAndExpr) { expr = expr.concat(e.expr); continue; } expr.push(e); } expr.sort(cmp); } return expr; }; ContextKeyAndExpr.prototype.normalize = function () { if (this.expr.length === 0) { return null; } if (this.expr.length === 1) { return this.expr[0]; } return this; }; ContextKeyAndExpr.prototype.keys = function () { var result = []; for (var _i = 0, _a = this.expr; _i < _a.length; _i++) { var expr = _a[_i]; result.push.apply(result, expr.keys()); } return result; }; return ContextKeyAndExpr; }()); var RawContextKey = /** @class */ (function (_super) { __extends(RawContextKey, _super); function RawContextKey(key, defaultValue) { var _this = _super.call(this, key) || this; _this._defaultValue = defaultValue; return _this; } RawContextKey.prototype.bindTo = function (target) { return target.createKey(this.key, this._defaultValue); }; RawContextKey.prototype.getValue = function (target) { return target.getContextKeyValue(this.key); }; RawContextKey.prototype.toNegated = function () { return ContextKeyExpr.not(this.key); }; return RawContextKey; }(ContextKeyDefinedExpr)); var IContextKeyService = Object(__WEBPACK_IMPORTED_MODULE_1__instantiation_common_instantiation_js__["c" /* createDecorator */])('contextKeyService'); var SET_CONTEXT_COMMAND_ID = 'setContext'; /***/ }), /***/ 1148: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Selection; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__position_js__ = __webpack_require__(854); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range_js__ = __webpack_require__(846); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); /** * A selection in the editor. * The selection is a range that has an orientation. */ var Selection = /** @class */ (function (_super) { __extends(Selection, _super); function Selection(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) { var _this = _super.call(this, selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) || this; _this.selectionStartLineNumber = selectionStartLineNumber; _this.selectionStartColumn = selectionStartColumn; _this.positionLineNumber = positionLineNumber; _this.positionColumn = positionColumn; return _this; } /** * Clone this selection. */ Selection.prototype.clone = function () { return new Selection(this.selectionStartLineNumber, this.selectionStartColumn, this.positionLineNumber, this.positionColumn); }; /** * Transform to a human-readable representation. */ Selection.prototype.toString = function () { return '[' + this.selectionStartLineNumber + ',' + this.selectionStartColumn + ' -> ' + this.positionLineNumber + ',' + this.positionColumn + ']'; }; /** * Test if equals other selection. */ Selection.prototype.equalsSelection = function (other) { return (Selection.selectionsEqual(this, other)); }; /** * Test if the two selections are equal. */ Selection.selectionsEqual = function (a, b) { return (a.selectionStartLineNumber === b.selectionStartLineNumber && a.selectionStartColumn === b.selectionStartColumn && a.positionLineNumber === b.positionLineNumber && a.positionColumn === b.positionColumn); }; /** * Get directions (LTR or RTL). */ Selection.prototype.getDirection = function () { if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) { return 0 /* LTR */; } return 1 /* RTL */; }; /** * Create a new selection with a different `positionLineNumber` and `positionColumn`. */ Selection.prototype.setEndPosition = function (endLineNumber, endColumn) { if (this.getDirection() === 0 /* LTR */) { return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn); } return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn); }; /** * Get the position at `positionLineNumber` and `positionColumn`. */ Selection.prototype.getPosition = function () { return new __WEBPACK_IMPORTED_MODULE_0__position_js__["a" /* Position */](this.positionLineNumber, this.positionColumn); }; /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ Selection.prototype.setStartPosition = function (startLineNumber, startColumn) { if (this.getDirection() === 0 /* LTR */) { return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn); } return new Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn); }; // ---- /** * Create a `Selection` from one or two positions */ Selection.fromPositions = function (start, end) { if (end === void 0) { end = start; } return new Selection(start.lineNumber, start.column, end.lineNumber, end.column); }; /** * Create a `Selection` from an `ISelection`. */ Selection.liftSelection = function (sel) { return new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); }; /** * `a` equals `b`. */ Selection.selectionsArrEqual = function (a, b) { if (a && !b || !a && b) { return false; } if (!a && !b) { return true; } if (a.length !== b.length) { return false; } for (var i = 0, len = a.length; i < len; i++) { if (!this.selectionsEqual(a[i], b[i])) { return false; } } return true; }; /** * Test if `obj` is an `ISelection`. */ Selection.isISelection = function (obj) { return (obj && (typeof obj.selectionStartLineNumber === 'number') && (typeof obj.selectionStartColumn === 'number') && (typeof obj.positionLineNumber === 'number') && (typeof obj.positionColumn === 'number')); }; /** * Create with a direction. */ Selection.createWithDirection = function (startLineNumber, startColumn, endLineNumber, endColumn, direction) { if (direction === 0 /* LTR */) { return new Selection(startLineNumber, startColumn, endLineNumber, endColumn); } return new Selection(endLineNumber, endColumn, startLineNumber, startColumn); }; return Selection; }(__WEBPACK_IMPORTED_MODULE_1__range_js__["a" /* Range */])); /***/ }), /***/ 1149: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = getZoomLevel; /* harmony export (immutable) */ __webpack_exports__["b"] = getTimeSinceLastZoomLevelChanged; /* harmony export (immutable) */ __webpack_exports__["o"] = onDidChangeZoomLevel; /* harmony export (immutable) */ __webpack_exports__["a"] = getPixelRatio; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return isIE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isEdge; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isEdgeOrIE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return isFirefox; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isWebKit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isChrome; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isSafari; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isWebkitWebView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isIPad; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return isEdgeWebView; }); /* harmony export (immutable) */ __webpack_exports__["d"] = hasClipboardSupport; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_event_js__ = __webpack_require__(833); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var WindowManager = /** @class */ (function () { function WindowManager() { // --- Zoom Level this._zoomLevel = 0; this._lastZoomLevelChangeTime = 0; this._onDidChangeZoomLevel = new __WEBPACK_IMPORTED_MODULE_0__common_event_js__["a" /* Emitter */](); this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event; } WindowManager.prototype.getZoomLevel = function () { return this._zoomLevel; }; WindowManager.prototype.getTimeSinceLastZoomLevelChanged = function () { return Date.now() - this._lastZoomLevelChangeTime; }; // --- Pixel Ratio WindowManager.prototype.getPixelRatio = function () { var ctx = document.createElement('canvas').getContext('2d'); var dpr = window.devicePixelRatio || 1; var bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; return dpr / bsr; }; WindowManager.INSTANCE = new WindowManager(); return WindowManager; }()); function getZoomLevel() { return WindowManager.INSTANCE.getZoomLevel(); } /** Returns the time (in ms) since the zoom level was changed */ function getTimeSinceLastZoomLevelChanged() { return WindowManager.INSTANCE.getTimeSinceLastZoomLevelChanged(); } function onDidChangeZoomLevel(callback) { return WindowManager.INSTANCE.onDidChangeZoomLevel(callback); } function getPixelRatio() { return WindowManager.INSTANCE.getPixelRatio(); } var userAgent = navigator.userAgent; var isIE = (userAgent.indexOf('Trident') >= 0); var isEdge = (userAgent.indexOf('Edge/') >= 0); var isEdgeOrIE = isIE || isEdge; var isFirefox = (userAgent.indexOf('Firefox') >= 0); var isWebKit = (userAgent.indexOf('AppleWebKit') >= 0); var isChrome = (userAgent.indexOf('Chrome') >= 0); var isSafari = (!isChrome && (userAgent.indexOf('Safari') >= 0)); var isWebkitWebView = (!isChrome && !isSafari && isWebKit); var isIPad = (userAgent.indexOf('iPad') >= 0); var isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0); function hasClipboardSupport() { if (isIE) { return false; } if (isEdge) { var index = userAgent.indexOf('Edge/'); var version = parseInt(userAgent.substring(index + 5, userAgent.indexOf('.', index)), 10); if (!version || (version >= 12 && version <= 16)) { return false; } } return true; } /***/ }), /***/ 1202: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["j"] = tail; /* harmony export (immutable) */ __webpack_exports__["k"] = tail2; /* harmony export (immutable) */ __webpack_exports__["d"] = equals; /* unused harmony export binarySearch */ /* unused harmony export findFirstInSorted */ /* harmony export (immutable) */ __webpack_exports__["h"] = mergeSort; /* unused harmony export groupBy */ /* harmony export (immutable) */ __webpack_exports__["b"] = coalesce; /* harmony export (immutable) */ __webpack_exports__["g"] = isFalsyOrEmpty; /* unused harmony export isNonEmptyArray */ /* harmony export (immutable) */ __webpack_exports__["c"] = distinct; /* harmony export (immutable) */ __webpack_exports__["f"] = firstIndex; /* harmony export (immutable) */ __webpack_exports__["e"] = first; /* unused harmony export flatten */ /* harmony export (immutable) */ __webpack_exports__["i"] = range; /* harmony export (immutable) */ __webpack_exports__["a"] = arrayInsert; /** * Returns the last element of an array. * @param array The array. * @param n Which element from the end (default is zero). */ function tail(array, n) { if (n === void 0) { n = 0; } return array[array.length - (1 + n)]; } function tail2(arr) { if (arr.length === 0) { throw new Error('Invalid tail call'); } return [arr.slice(0, arr.length - 1), arr[arr.length - 1]]; } function equals(one, other, itemEquals) { if (itemEquals === void 0) { itemEquals = function (a, b) { return a === b; }; } if (one === other) { return true; } if (!one || !other) { return false; } if (one.length !== other.length) { return false; } for (var i = 0, len = one.length; i < len; i++) { if (!itemEquals(one[i], other[i])) { return false; } } return true; } function binarySearch(array, key, comparator) { var low = 0, high = array.length - 1; while (low <= high) { var mid = ((low + high) / 2) | 0; var comp = comparator(array[mid], key); if (comp < 0) { low = mid + 1; } else if (comp > 0) { high = mid - 1; } else { return mid; } } return -(low + 1); } /** * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false * are located before all elements where p(x) is true. * @returns the least x for which p(x) is true or array.length if no element fullfills the given function. */ function findFirstInSorted(array, p) { var low = 0, high = array.length; if (high === 0) { return 0; // no children } while (low < high) { var mid = Math.floor((low + high) / 2); if (p(array[mid])) { high = mid; } else { low = mid + 1; } } return low; } /** * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort` * so only use this when actually needing stable sort. */ function mergeSort(data, compare) { _sort(data, compare, 0, data.length - 1, []); return data; } function _merge(a, compare, lo, mid, hi, aux) { var leftIdx = lo, rightIdx = mid + 1; for (var i = lo; i <= hi; i++) { aux[i] = a[i]; } for (var i = lo; i <= hi; i++) { if (leftIdx > mid) { // left side consumed a[i] = aux[rightIdx++]; } else if (rightIdx > hi) { // right side consumed a[i] = aux[leftIdx++]; } else if (compare(aux[rightIdx], aux[leftIdx]) < 0) { // right element is less -> comes first a[i] = aux[rightIdx++]; } else { // left element comes first (less or equal) a[i] = aux[leftIdx++]; } } } function _sort(a, compare, lo, hi, aux) { if (hi <= lo) { return; } var mid = lo + ((hi - lo) / 2) | 0; _sort(a, compare, lo, mid, aux); _sort(a, compare, mid + 1, hi, aux); if (compare(a[mid], a[mid + 1]) <= 0) { // left and right are sorted and if the last-left element is less // or equals than the first-right element there is nothing else // to do return; } _merge(a, compare, lo, mid, hi, aux); } function groupBy(data, compare) { var result = []; var currentGroup = undefined; for (var _i = 0, _a = mergeSort(data.slice(0), compare); _i < _a.length; _i++) { var element = _a[_i]; if (!currentGroup || compare(currentGroup[0], element) !== 0) { currentGroup = [element]; result.push(currentGroup); } else { currentGroup.push(element); } } return result; } /** * @returns a new array with all falsy values removed. The original array IS NOT modified. */ function coalesce(array) { if (!array) { return array; } return array.filter(function (e) { return !!e; }); } /** * @returns false if the provided object is an array and not empty. */ function isFalsyOrEmpty(obj) { return !Array.isArray(obj) || obj.length === 0; } /** * @returns True if the provided object is an array and has at least one element. */ function isNonEmptyArray(obj) { return Array.isArray(obj) && obj.length > 0; } /** * Removes duplicates from the given array. The optional keyFn allows to specify * how elements are checked for equalness by returning a unique string for each. */ function distinct(array, keyFn) { if (!keyFn) { return array.filter(function (element, position) { return array.indexOf(element) === position; }); } var seen = Object.create(null); return array.filter(function (elem) { var key = keyFn(elem); if (seen[key]) { return false; } seen[key] = true; return true; }); } function firstIndex(array, fn) { for (var i = 0; i < array.length; i++) { var element = array[i]; if (fn(element)) { return i; } } return -1; } function first(array, fn, notFoundValue) { if (notFoundValue === void 0) { notFoundValue = null; } var index = firstIndex(array, fn); return index < 0 ? notFoundValue : array[index]; } function flatten(arr) { var _a; return (_a = []).concat.apply(_a, arr); } function range(arg, to) { var from = typeof to === 'number' ? arg : 0; if (typeof to === 'number') { from = arg; } else { from = 0; to = arg; } var result = []; if (from <= to) { for (var i = from; i < to; i++) { result.push(i); } } else { for (var i = from; i > to; i--) { result.push(i); } } return result; } /** * Insert `insertArr` inside `target` at `insertIndex`. * Please don't touch unless you understand https://jsperf.com/inserting-an-array-within-an-array */ function arrayInsert(target, insertIndex, insertArr) { var before = target.slice(0, insertIndex); var after = target.slice(insertIndex); return before.concat(insertArr, after); } /***/ }), /***/ 1203: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Registry; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_types_js__ = __webpack_require__(1057); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_assert_js__ = __webpack_require__(1683); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var RegistryImpl = /** @class */ (function () { function RegistryImpl() { this.data = {}; } RegistryImpl.prototype.add = function (id, data) { __WEBPACK_IMPORTED_MODULE_1__base_common_assert_js__["a" /* ok */](__WEBPACK_IMPORTED_MODULE_0__base_common_types_js__["i" /* isString */](id)); __WEBPACK_IMPORTED_MODULE_1__base_common_assert_js__["a" /* ok */](__WEBPACK_IMPORTED_MODULE_0__base_common_types_js__["h" /* isObject */](data)); __WEBPACK_IMPORTED_MODULE_1__base_common_assert_js__["a" /* ok */](!this.data.hasOwnProperty(id), 'There is already an extension with this id'); this.data[id] = data; }; RegistryImpl.prototype.as = function (id) { return this.data[id] || null; }; return RegistryImpl; }()); var Registry = new RegistryImpl(); /***/ }), /***/ 1204: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CursorConfiguration; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return SingleCursorState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CursorContext; }); /* unused harmony export PartialModelCursorState */ /* unused harmony export PartialViewCursorState */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CursorState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return EditOperationResult; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CursorColumns; }); /* harmony export (immutable) */ __webpack_exports__["g"] = isQuote; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__ = __webpack_require__(956); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_strings_js__ = __webpack_require__(847); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_position_js__ = __webpack_require__(854); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_range_js__ = __webpack_require__(846); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_selection_js__ = __webpack_require__(1148); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__model_textModel_js__ = __webpack_require__(1451); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__modes_languageConfigurationRegistry_js__ = __webpack_require__(1327); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var autoCloseAlways = function (_) { return true; }; var autoCloseNever = function (_) { return false; }; var autoCloseBeforeWhitespace = function (chr) { return (chr === ' ' || chr === '\t'); }; var CursorConfiguration = /** @class */ (function () { function CursorConfiguration(languageIdentifier, modelOptions, configuration) { this._languageIdentifier = languageIdentifier; var c = configuration.editor; this.readOnly = c.readOnly; this.tabSize = modelOptions.tabSize; this.indentSize = modelOptions.indentSize; this.insertSpaces = modelOptions.insertSpaces; this.pageSize = Math.max(1, Math.floor(c.layoutInfo.height / c.fontInfo.lineHeight) - 2); this.lineHeight = c.lineHeight; this.useTabStops = c.useTabStops; this.wordSeparators = c.wordSeparators; this.emptySelectionClipboard = c.emptySelectionClipboard; this.copyWithSyntaxHighlighting = c.copyWithSyntaxHighlighting; this.multiCursorMergeOverlapping = c.multiCursorMergeOverlapping; this.autoClosingBrackets = c.autoClosingBrackets; this.autoClosingQuotes = c.autoClosingQuotes; this.autoSurround = c.autoSurround; this.autoIndent = c.autoIndent; this.autoClosingPairsOpen = {}; this.autoClosingPairsClose = {}; this.surroundingPairs = {}; this._electricChars = null; this.shouldAutoCloseBefore = { quote: CursorConfiguration._getShouldAutoClose(languageIdentifier, this.autoClosingQuotes), bracket: CursorConfiguration._getShouldAutoClose(languageIdentifier, this.autoClosingBrackets) }; var autoClosingPairs = CursorConfiguration._getAutoClosingPairs(languageIdentifier); if (autoClosingPairs) { for (var _i = 0, autoClosingPairs_1 = autoClosingPairs; _i < autoClosingPairs_1.length; _i++) { var pair = autoClosingPairs_1[_i]; this.autoClosingPairsOpen[pair.open] = pair.close; this.autoClosingPairsClose[pair.close] = pair.open; } } var surroundingPairs = CursorConfiguration._getSurroundingPairs(languageIdentifier); if (surroundingPairs) { for (var _a = 0, surroundingPairs_1 = surroundingPairs; _a < surroundingPairs_1.length; _a++) { var pair = surroundingPairs_1[_a]; this.surroundingPairs[pair.open] = pair.close; } } } CursorConfiguration.shouldRecreate = function (e) { return (e.layoutInfo || e.wordSeparators || e.emptySelectionClipboard || e.multiCursorMergeOverlapping || e.autoClosingBrackets || e.autoClosingQuotes || e.autoSurround || e.useTabStops || e.lineHeight || e.readOnly); }; Object.defineProperty(CursorConfiguration.prototype, "electricChars", { get: function () { if (!this._electricChars) { this._electricChars = {}; var electricChars = CursorConfiguration._getElectricCharacters(this._languageIdentifier); if (electricChars) { for (var _i = 0, electricChars_1 = electricChars; _i < electricChars_1.length; _i++) { var char = electricChars_1[_i]; this._electricChars[char] = true; } } } return this._electricChars; }, enumerable: true, configurable: true }); CursorConfiguration.prototype.normalizeIndentation = function (str) { return __WEBPACK_IMPORTED_MODULE_5__model_textModel_js__["b" /* TextModel */].normalizeIndentation(str, this.indentSize, this.insertSpaces); }; CursorConfiguration._getElectricCharacters = function (languageIdentifier) { try { return __WEBPACK_IMPORTED_MODULE_6__modes_languageConfigurationRegistry_js__["a" /* LanguageConfigurationRegistry */].getElectricCharacters(languageIdentifier.id); } catch (e) { Object(__WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__["e" /* onUnexpectedError */])(e); return null; } }; CursorConfiguration._getAutoClosingPairs = function (languageIdentifier) { try { return __WEBPACK_IMPORTED_MODULE_6__modes_languageConfigurationRegistry_js__["a" /* LanguageConfigurationRegistry */].getAutoClosingPairs(languageIdentifier.id); } catch (e) { Object(__WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__["e" /* onUnexpectedError */])(e); return null; } }; CursorConfiguration._getShouldAutoClose = function (languageIdentifier, autoCloseConfig) { switch (autoCloseConfig) { case 'beforeWhitespace': return autoCloseBeforeWhitespace; case 'languageDefined': return CursorConfiguration._getLanguageDefinedShouldAutoClose(languageIdentifier); case 'always': return autoCloseAlways; case 'never': return autoCloseNever; } }; CursorConfiguration._getLanguageDefinedShouldAutoClose = function (languageIdentifier) { try { var autoCloseBeforeSet_1 = __WEBPACK_IMPORTED_MODULE_6__modes_languageConfigurationRegistry_js__["a" /* LanguageConfigurationRegistry */].getAutoCloseBeforeSet(languageIdentifier.id); return function (c) { return autoCloseBeforeSet_1.indexOf(c) !== -1; }; } catch (e) { Object(__WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__["e" /* onUnexpectedError */])(e); return autoCloseNever; } }; CursorConfiguration._getSurroundingPairs = function (languageIdentifier) { try { return __WEBPACK_IMPORTED_MODULE_6__modes_languageConfigurationRegistry_js__["a" /* LanguageConfigurationRegistry */].getSurroundingPairs(languageIdentifier.id); } catch (e) { Object(__WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__["e" /* onUnexpectedError */])(e); return null; } }; return CursorConfiguration; }()); /** * Represents the cursor state on either the model or on the view model. */ var SingleCursorState = /** @class */ (function () { function SingleCursorState(selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns) { this.selectionStart = selectionStart; this.selectionStartLeftoverVisibleColumns = selectionStartLeftoverVisibleColumns; this.position = position; this.leftoverVisibleColumns = leftoverVisibleColumns; this.selection = SingleCursorState._computeSelection(this.selectionStart, this.position); } SingleCursorState.prototype.equals = function (other) { return (this.selectionStartLeftoverVisibleColumns === other.selectionStartLeftoverVisibleColumns && this.leftoverVisibleColumns === other.leftoverVisibleColumns && this.position.equals(other.position) && this.selectionStart.equalsRange(other.selectionStart)); }; SingleCursorState.prototype.hasSelection = function () { return (!this.selection.isEmpty() || !this.selectionStart.isEmpty()); }; SingleCursorState.prototype.move = function (inSelectionMode, lineNumber, column, leftoverVisibleColumns) { if (inSelectionMode) { // move just position return new SingleCursorState(this.selectionStart, this.selectionStartLeftoverVisibleColumns, new __WEBPACK_IMPORTED_MODULE_2__core_position_js__["a" /* Position */](lineNumber, column), leftoverVisibleColumns); } else { // move everything return new SingleCursorState(new __WEBPACK_IMPORTED_MODULE_3__core_range_js__["a" /* Range */](lineNumber, column, lineNumber, column), leftoverVisibleColumns, new __WEBPACK_IMPORTED_MODULE_2__core_position_js__["a" /* Position */](lineNumber, column), leftoverVisibleColumns); } }; SingleCursorState._computeSelection = function (selectionStart, position) { var startLineNumber, startColumn, endLineNumber, endColumn; if (selectionStart.isEmpty()) { startLineNumber = selectionStart.startLineNumber; startColumn = selectionStart.startColumn; endLineNumber = position.lineNumber; endColumn = position.column; } else { if (position.isBeforeOrEqual(selectionStart.getStartPosition())) { startLineNumber = selectionStart.endLineNumber; startColumn = selectionStart.endColumn; endLineNumber = position.lineNumber; endColumn = position.column; } else { startLineNumber = selectionStart.startLineNumber; startColumn = selectionStart.startColumn; endLineNumber = position.lineNumber; endColumn = position.column; } } return new __WEBPACK_IMPORTED_MODULE_4__core_selection_js__["a" /* Selection */](startLineNumber, startColumn, endLineNumber, endColumn); }; return SingleCursorState; }()); var CursorContext = /** @class */ (function () { function CursorContext(configuration, model, viewModel) { this.model = model; this.viewModel = viewModel; this.config = new CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), configuration); } CursorContext.prototype.validateViewPosition = function (viewPosition, modelPosition) { return this.viewModel.coordinatesConverter.validateViewPosition(viewPosition, modelPosition); }; CursorContext.prototype.validateViewRange = function (viewRange, expectedModelRange) { return this.viewModel.coordinatesConverter.validateViewRange(viewRange, expectedModelRange); }; CursorContext.prototype.convertViewRangeToModelRange = function (viewRange) { return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); }; CursorContext.prototype.convertViewPositionToModelPosition = function (lineNumber, column) { return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new __WEBPACK_IMPORTED_MODULE_2__core_position_js__["a" /* Position */](lineNumber, column)); }; CursorContext.prototype.convertModelPositionToViewPosition = function (modelPosition) { return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); }; CursorContext.prototype.convertModelRangeToViewRange = function (modelRange) { return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(modelRange); }; CursorContext.prototype.getCurrentScrollTop = function () { return this.viewModel.viewLayout.getCurrentScrollTop(); }; CursorContext.prototype.getCompletelyVisibleViewRange = function () { return this.viewModel.getCompletelyVisibleViewRange(); }; CursorContext.prototype.getCompletelyVisibleModelRange = function () { var viewRange = this.viewModel.getCompletelyVisibleViewRange(); return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); }; CursorContext.prototype.getCompletelyVisibleViewRangeAtScrollTop = function (scrollTop) { return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); }; CursorContext.prototype.getVerticalOffsetForViewLine = function (viewLineNumber) { return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); }; return CursorContext; }()); var PartialModelCursorState = /** @class */ (function () { function PartialModelCursorState(modelState) { this.modelState = modelState; this.viewState = null; } return PartialModelCursorState; }()); var PartialViewCursorState = /** @class */ (function () { function PartialViewCursorState(viewState) { this.modelState = null; this.viewState = viewState; } return PartialViewCursorState; }()); var CursorState = /** @class */ (function () { function CursorState(modelState, viewState) { this.modelState = modelState; this.viewState = viewState; } CursorState.fromModelState = function (modelState) { return new PartialModelCursorState(modelState); }; CursorState.fromViewState = function (viewState) { return new PartialViewCursorState(viewState); }; CursorState.fromModelSelection = function (modelSelection) { var selectionStartLineNumber = modelSelection.selectionStartLineNumber; var selectionStartColumn = modelSelection.selectionStartColumn; var positionLineNumber = modelSelection.positionLineNumber; var positionColumn = modelSelection.positionColumn; var modelState = new SingleCursorState(new __WEBPACK_IMPORTED_MODULE_3__core_range_js__["a" /* Range */](selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, new __WEBPACK_IMPORTED_MODULE_2__core_position_js__["a" /* Position */](positionLineNumber, positionColumn), 0); return CursorState.fromModelState(modelState); }; CursorState.fromModelSelections = function (modelSelections) { var states = []; for (var i = 0, len = modelSelections.length; i < len; i++) { states[i] = this.fromModelSelection(modelSelections[i]); } return states; }; CursorState.prototype.equals = function (other) { return (this.viewState.equals(other.viewState) && this.modelState.equals(other.modelState)); }; return CursorState; }()); var EditOperationResult = /** @class */ (function () { function EditOperationResult(type, commands, opts) { this.type = type; this.commands = commands; this.shouldPushStackElementBefore = opts.shouldPushStackElementBefore; this.shouldPushStackElementAfter = opts.shouldPushStackElementAfter; } return EditOperationResult; }()); /** * Common operations that work and make sense both on the model and on the view model. */ var CursorColumns = /** @class */ (function () { function CursorColumns() { } CursorColumns.isLowSurrogate = function (model, lineNumber, charOffset) { var lineContent = model.getLineContent(lineNumber); if (charOffset < 0 || charOffset >= lineContent.length) { return false; } return __WEBPACK_IMPORTED_MODULE_1__base_common_strings_js__["u" /* isLowSurrogate */](lineContent.charCodeAt(charOffset)); }; CursorColumns.isHighSurrogate = function (model, lineNumber, charOffset) { var lineContent = model.getLineContent(lineNumber); if (charOffset < 0 || charOffset >= lineContent.length) { return false; } return __WEBPACK_IMPORTED_MODULE_1__base_common_strings_js__["t" /* isHighSurrogate */](lineContent.charCodeAt(charOffset)); }; CursorColumns.isInsideSurrogatePair = function (model, lineNumber, column) { return this.isHighSurrogate(model, lineNumber, column - 2); }; CursorColumns.visibleColumnFromColumn = function (lineContent, column, tabSize) { var endOffset = lineContent.length; if (endOffset > column - 1) { endOffset = column - 1; } var result = 0; for (var i = 0; i < endOffset; i++) { var charCode = lineContent.charCodeAt(i); if (charCode === 9 /* Tab */) { result = this.nextRenderTabStop(result, tabSize); } else if (__WEBPACK_IMPORTED_MODULE_1__base_common_strings_js__["s" /* isFullWidthCharacter */](charCode)) { result = result + 2; } else { result = result + 1; } } return result; }; CursorColumns.visibleColumnFromColumn2 = function (config, model, position) { return this.visibleColumnFromColumn(model.getLineContent(position.lineNumber), position.column, config.tabSize); }; CursorColumns.columnFromVisibleColumn = function (lineContent, visibleColumn, tabSize) { if (visibleColumn <= 0) { return 1; } var lineLength = lineContent.length; var beforeVisibleColumn = 0; for (var i = 0; i < lineLength; i++) { var charCode = lineContent.charCodeAt(i); var afterVisibleColumn = void 0; if (charCode === 9 /* Tab */) { afterVisibleColumn = this.nextRenderTabStop(beforeVisibleColumn, tabSize); } else if (__WEBPACK_IMPORTED_MODULE_1__base_common_strings_js__["s" /* isFullWidthCharacter */](charCode)) { afterVisibleColumn = beforeVisibleColumn + 2; } else { afterVisibleColumn = beforeVisibleColumn + 1; } if (afterVisibleColumn >= visibleColumn) { var prevDelta = visibleColumn - beforeVisibleColumn; var afterDelta = afterVisibleColumn - visibleColumn; if (afterDelta < prevDelta) { return i + 2; } else { return i + 1; } } beforeVisibleColumn = afterVisibleColumn; } // walked the entire string return lineLength + 1; }; CursorColumns.columnFromVisibleColumn2 = function (config, model, lineNumber, visibleColumn) { var result = this.columnFromVisibleColumn(model.getLineContent(lineNumber), visibleColumn, config.tabSize); var minColumn = model.getLineMinColumn(lineNumber); if (result < minColumn) { return minColumn; } var maxColumn = model.getLineMaxColumn(lineNumber); if (result > maxColumn) { return maxColumn; } return result; }; /** * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) */ CursorColumns.nextRenderTabStop = function (visibleColumn, tabSize) { return visibleColumn + tabSize - visibleColumn % tabSize; }; /** * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) */ CursorColumns.nextIndentTabStop = function (visibleColumn, indentSize) { return visibleColumn + indentSize - visibleColumn % indentSize; }; /** * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) */ CursorColumns.prevRenderTabStop = function (column, tabSize) { return column - 1 - (column - 1) % tabSize; }; /** * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) */ CursorColumns.prevIndentTabStop = function (column, indentSize) { return column - 1 - (column - 1) % indentSize; }; return CursorColumns; }()); function isQuote(ch) { return (ch === '\'' || ch === '"' || ch === '`'); } /***/ }), /***/ 1271: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ICommandService; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CommandsRegistry; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_lifecycle_js__ = __webpack_require__(825); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_types_js__ = __webpack_require__(1057); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__instantiation_common_instantiation_js__ = __webpack_require__(855); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__base_common_event_js__ = __webpack_require__(833); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__base_common_linkedList_js__ = __webpack_require__(1679); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var ICommandService = Object(__WEBPACK_IMPORTED_MODULE_2__instantiation_common_instantiation_js__["c" /* createDecorator */])('commandService'); var CommandsRegistry = new /** @class */ (function () { function class_1() { this._commands = new Map(); this._onDidRegisterCommand = new __WEBPACK_IMPORTED_MODULE_3__base_common_event_js__["a" /* Emitter */](); this.onDidRegisterCommand = this._onDidRegisterCommand.event; } class_1.prototype.registerCommand = function (idOrCommand, handler) { var _this = this; if (!idOrCommand) { throw new Error("invalid command"); } if (typeof idOrCommand === 'string') { if (!handler) { throw new Error("invalid command"); } return this.registerCommand({ id: idOrCommand, handler: handler }); } // add argument validation if rich command metadata is provided if (idOrCommand.description) { var constraints_1 = []; for (var _i = 0, _a = idOrCommand.description.args; _i < _a.length; _i++) { var arg = _a[_i]; constraints_1.push(arg.constraint); } var actualHandler_1 = idOrCommand.handler; idOrCommand.handler = function (accessor) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } Object(__WEBPACK_IMPORTED_MODULE_1__base_common_types_js__["l" /* validateConstraints */])(args, constraints_1); return actualHandler_1.apply(void 0, [accessor].concat(args)); }; } // find a place to store the command var id = idOrCommand.id; var commands = this._commands.get(id); if (!commands) { commands = new __WEBPACK_IMPORTED_MODULE_4__base_common_linkedList_js__["a" /* LinkedList */](); this._commands.set(id, commands); } var removeFn = commands.unshift(idOrCommand); var ret = Object(__WEBPACK_IMPORTED_MODULE_0__base_common_lifecycle_js__["e" /* toDisposable */])(function () { removeFn(); var command = _this._commands.get(id); if (command && command.isEmpty()) { _this._commands.delete(id); } }); // tell the world about this command this._onDidRegisterCommand.fire(id); return ret; }; class_1.prototype.registerCommandAlias = function (oldId, newId) { return CommandsRegistry.registerCommand(oldId, function (accessor) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } var _a; return (_a = accessor.get(ICommandService)).executeCommand.apply(_a, [newId].concat(args)); }); }; class_1.prototype.getCommand = function (id) { var list = this._commands.get(id); if (!list || list.isEmpty()) { return undefined; } return list.iterator().next().value; }; class_1.prototype.getCommands = function () { var _this = this; var result = Object.create(null); this._commands.forEach(function (value, key) { result[key] = _this.getCommand(key); }); return result; }; return class_1; }()); /***/ }), /***/ 1272: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return editorLineHighlight; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return editorLineHighlightBorder; }); /* unused harmony export editorRangeHighlight */ /* unused harmony export editorRangeHighlightBorder */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return editorCursorForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return editorCursorBackground; }); /* unused harmony export editorWhitespaces */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return editorIndentGuides; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return editorActiveIndentGuides; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return editorLineNumbers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return editorActiveLineNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return editorRuler; }); /* unused harmony export editorCodeLensForeground */ /* unused harmony export editorBracketMatchBackground */ /* unused harmony export editorBracketMatchBorder */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return editorOverviewRulerBorder; }); /* unused harmony export editorGutter */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return editorErrorForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return editorErrorBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return editorWarningForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return editorWarningBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return editorInfoForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return editorInfoBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return editorHintForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return editorHintBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return editorUnnecessaryCodeBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return editorUnnecessaryCodeOpacity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return overviewRulerError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return overviewRulerWarning; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return overviewRulerInfo; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nls_js__ = __webpack_require__(936); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__ = __webpack_require__(1331); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__ = __webpack_require__(1291); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__platform_theme_common_themeService_js__ = __webpack_require__(937); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ /** * Definition of the editor colors */ var editorLineHighlight = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editor.lineHighlightBackground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('lineHighlight', 'Background color for the highlight of line at the cursor position.')); var editorLineHighlightBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.')); var editorRangeHighlight = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('rangeHighlight', 'Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations.'), true); var editorRangeHighlightBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editor.rangeHighlightBorder', { dark: null, light: null, hc: __WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["b" /* activeContrastBorder */] }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('rangeHighlightBorder', 'Background color of the border around highlighted ranges.'), true); var editorCursorForeground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorCursor.foreground', { dark: '#AEAFAD', light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('caret', 'Color of the editor cursor.')); var editorCursorBackground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorCursor.background', null, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorCursorBackground', 'The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.')); var editorWhitespaces = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorWhitespaces', 'Color of whitespace characters in the editor.')); var editorIndentGuides = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorIndentGuides', 'Color of the editor indentation guides.')); var editorActiveIndentGuides = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorIndentGuide.activeBackground', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorActiveIndentGuide', 'Color of the active editor indentation guides.')); var editorLineNumbers = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorLineNumber.foreground', { dark: '#858585', light: '#237893', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorLineNumbers', 'Color of editor line numbers.')); var deprecatedEditorActiveLineNumber = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorActiveLineNumber.foreground', { dark: '#c6c6c6', light: '#0B216F', hc: __WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["b" /* activeContrastBorder */] }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorActiveLineNumber', 'Color of editor active line number'), false, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('deprecatedEditorActiveLineNumber', 'Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.')); var editorActiveLineNumber = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorLineNumber.activeForeground', { dark: deprecatedEditorActiveLineNumber, light: deprecatedEditorActiveLineNumber, hc: deprecatedEditorActiveLineNumber }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorActiveLineNumber', 'Color of editor active line number')); var editorRuler = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorRuler.foreground', { dark: '#5A5A5A', light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].lightgrey, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorRuler', 'Color of the editor rulers.')); var editorCodeLensForeground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorCodeLensForeground', 'Foreground color of editor code lenses')); var editorBracketMatchBackground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorBracketMatchBackground', 'Background color behind matching brackets')); var editorBracketMatchBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: '#fff' }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorBracketMatchBorder', 'Color for matching brackets boxes')); var editorOverviewRulerBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorOverviewRulerBorder', 'Color of the overview ruler border.')); var editorGutter = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorGutter.background', { dark: __WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["n" /* editorBackground */], light: __WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["n" /* editorBackground */], hc: __WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["n" /* editorBackground */] }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.')); var editorErrorForeground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorError.foreground', { dark: '#ea4646', light: '#d60a0a', hc: null }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('errorForeground', 'Foreground color of error squigglies in the editor.')); var editorErrorBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorError.border', { dark: null, light: null, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#E47777').transparent(0.8) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('errorBorder', 'Border color of error squigglies in the editor.')); var editorWarningForeground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorWarning.foreground', { dark: '#4d9e4d', light: '#117711', hc: null }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('warningForeground', 'Foreground color of warning squigglies in the editor.')); var editorWarningBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorWarning.border', { dark: null, light: null, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#71B771').transparent(0.8) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('warningBorder', 'Border color of warning squigglies in the editor.')); var editorInfoForeground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorInfo.foreground', { dark: '#008000', light: '#008000', hc: null }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('infoForeground', 'Foreground color of info squigglies in the editor.')); var editorInfoBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorInfo.border', { dark: null, light: null, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#71B771').transparent(0.8) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('infoBorder', 'Border color of info squigglies in the editor.')); var editorHintForeground = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorHint.foreground', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('hintForeground', 'Foreground color of hint squigglies in the editor.')); var editorHintBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorHint.border', { dark: null, light: null, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#eeeeee').transparent(0.8) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('hintBorder', 'Border color of hint squigglies in the editor.')); var editorUnnecessaryCodeBorder = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorUnnecessaryCode.border', { dark: null, light: null, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#fff').transparent(0.8) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('unnecessaryCodeBorder', 'Border color of unnecessary (unused) source code in the editor.')); var editorUnnecessaryCodeOpacity = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorUnnecessaryCode.opacity', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#000a'), light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#0007'), hc: null }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('unnecessaryCodeOpacity', 'Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the \'editorUnnecessaryCode.border\' theme color to underline unnecessary code instead of fading it out.')); var overviewRulerError = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorOverviewRuler.errorForeground', { dark: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](255, 18, 18, 0.7)), light: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](255, 18, 18, 0.7)), hc: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](255, 50, 50, 1)) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('overviewRuleError', 'Overview ruler marker color for errors.')); var overviewRulerWarning = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorOverviewRuler.warningForeground', { dark: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](18, 136, 18, 0.7)), light: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](18, 136, 18, 0.7)), hc: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](50, 255, 50, 1)) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('overviewRuleWarning', 'Overview ruler marker color for warnings.')); var overviewRulerInfo = Object(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["_3" /* registerColor */])('editorOverviewRuler.infoForeground', { dark: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](18, 18, 136, 0.7)), light: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](18, 18, 136, 0.7)), hc: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](50, 50, 255, 1)) }, __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('overviewRuleInfo', 'Overview ruler marker color for infos.')); // contains all color rules that used to defined in editor/browser/widget/editor.css Object(__WEBPACK_IMPORTED_MODULE_3__platform_theme_common_themeService_js__["e" /* registerThemingParticipant */])(function (theme, collector) { var background = theme.getColor(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["n" /* editorBackground */]); if (background) { collector.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: " + background + "; }"); } var foreground = theme.getColor(__WEBPACK_IMPORTED_MODULE_2__platform_theme_common_colorRegistry_js__["o" /* editorForeground */]); if (foreground) { collector.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: " + foreground + "; }"); } var gutter = theme.getColor(editorGutter); if (gutter) { collector.addRule(".monaco-editor .margin { background-color: " + gutter + "; }"); } var rangeHighlight = theme.getColor(editorRangeHighlight); if (rangeHighlight) { collector.addRule(".monaco-editor .rangeHighlight { background-color: " + rangeHighlight + "; }"); } var rangeHighlightBorder = theme.getColor(editorRangeHighlightBorder); if (rangeHighlightBorder) { collector.addRule(".monaco-editor .rangeHighlight { border: 1px " + (theme.type === 'hc' ? 'dotted' : 'solid') + " " + rangeHighlightBorder + "; }"); } var invisibles = theme.getColor(editorWhitespaces); if (invisibles) { collector.addRule(".vs-whitespace { color: " + invisibles + " !important; }"); } }); /***/ }), /***/ 1278: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return URI; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__platform_js__ = __webpack_require__(894); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var _a; var _schemePattern = /^\w[\w\d+.-]*$/; var _singleSlashStart = /^\//; var _doubleSlashStart = /^\/\//; var _throwOnMissingSchema = true; function _validateUri(ret, _strict) { // scheme, must be set if (!ret.scheme) { if (_strict || _throwOnMissingSchema) { throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}"); } else { console.warn("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}"); } } // scheme, https://tools.ietf.org/html/rfc3986#section-3.1 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) if (ret.scheme && !_schemePattern.test(ret.scheme)) { throw new Error('[UriError]: Scheme contains illegal characters.'); } // path, http://tools.ietf.org/html/rfc3986#section-3.3 // If a URI contains an authority component, then the path component // must either be empty or begin with a slash ("/") character. If a URI // does not contain an authority component, then the path cannot begin // with two slash characters ("//"). if (ret.path) { if (ret.authority) { if (!_singleSlashStart.test(ret.path)) { throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character'); } } else { if (_doubleSlashStart.test(ret.path)) { throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); } } } } // implements a bit of https://tools.ietf.org/html/rfc3986#section-5 function _referenceResolution(scheme, path) { // the slash-character is our 'default base' as we don't // support constructing URIs relative to other URIs. This // also means that we alter and potentially break paths. // see https://tools.ietf.org/html/rfc3986#section-5.1.4 switch (scheme) { case 'https': case 'http': case 'file': if (!path) { path = _slash; } else if (path[0] !== _slash) { path = _slash + path; } break; } return path; } var _empty = ''; var _slash = '/'; var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; /** * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. * This class is a simple parser which creates the basic component parts * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation * and encoding. * * foo://example.com:8042/over/there?name=ferret#nose * \_/ \______________/\_________/ \_________/ \__/ * | | | | | * scheme authority path query fragment * | _____________________|__ * / \ / \ * urn:example:animal:ferret:nose */ var URI = /** @class */ (function () { /** * @internal */ function URI(schemeOrData, authority, path, query, fragment, _strict) { if (typeof schemeOrData === 'object') { this.scheme = schemeOrData.scheme || _empty; this.authority = schemeOrData.authority || _empty; this.path = schemeOrData.path || _empty; this.query = schemeOrData.query || _empty; this.fragment = schemeOrData.fragment || _empty; // no validation because it's this URI // that creates uri components. // _validateUri(this); } else { this.scheme = schemeOrData || _empty; this.authority = authority || _empty; this.path = _referenceResolution(this.scheme, path || _empty); this.query = query || _empty; this.fragment = fragment || _empty; _validateUri(this, _strict); } } URI.isUri = function (thing) { if (thing instanceof URI) { return true; } if (!thing) { return false; } return typeof thing.authority === 'string' && typeof thing.fragment === 'string' && typeof thing.path === 'string' && typeof thing.query === 'string' && typeof thing.scheme === 'string' && typeof thing.fsPath === 'function' && typeof thing.with === 'function' && typeof thing.toString === 'function'; }; Object.defineProperty(URI.prototype, "fsPath", { // ---- filesystem path ----------------------- /** * Returns a string representing the corresponding file system path of this URI. * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the * platform specific path separator. * * * Will *not* validate the path for invalid characters and semantics. * * Will *not* look at the scheme of this URI. * * The result shall *not* be used for display purposes but for accessing a file on disk. * * * The *difference* to `URI#path` is the use of the platform specific separator and the handling * of UNC paths. See the below sample of a file-uri with an authority (UNC path). * * ```ts const u = URI.parse('file://server/c$/folder/file.txt') u.authority === 'server' u.path === '/shares/c$/file.txt' u.fsPath === '\\server\c$\folder\file.txt' ``` * * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working * with URIs that represent files on disk (`file` scheme). */ get: function () { // if (this.scheme !== 'file') { // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`); // } return _makeFsPath(this); }, enumerable: true, configurable: true }); // ---- modify to new ------------------------- URI.prototype.with = function (change) { if (!change) { return this; } var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment; if (scheme === undefined) { scheme = this.scheme; } else if (scheme === null) { scheme = _empty; } if (authority === undefined) { authority = this.authority; } else if (authority === null) { authority = _empty; } if (path === undefined) { path = this.path; } else if (path === null) { path = _empty; } if (query === undefined) { query = this.query; } else if (query === null) { query = _empty; } if (fragment === undefined) { fragment = this.fragment; } else if (fragment === null) { fragment = _empty; } if (scheme === this.scheme && authority === this.authority && path === this.path && query === this.query && fragment === this.fragment) { return this; } return new _URI(scheme, authority, path, query, fragment); }; // ---- parse & validate ------------------------ /** * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`, * `file:///usr/home`, or `scheme:with/path`. * * @param value A string which represents an URI (see `URI#toString`). */ URI.parse = function (value, _strict) { if (_strict === void 0) { _strict = false; } var match = _regexp.exec(value); if (!match) { return new _URI(_empty, _empty, _empty, _empty, _empty); } return new _URI(match[2] || _empty, decodeURIComponent(match[4] || _empty), decodeURIComponent(match[5] || _empty), decodeURIComponent(match[7] || _empty), decodeURIComponent(match[9] || _empty), _strict); }; /** * Creates a new URI from a file system path, e.g. `c:\my\files`, * `/usr/home`, or `\\server\share\some\path`. * * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** * `URI.parse('file://' + path)` because the path might contain characters that are * interpreted (# and ?). See the following sample: * ```ts const good = URI.file('/coding/c#/project1'); good.scheme === 'file'; good.path === '/coding/c#/project1'; good.fragment === ''; const bad = URI.parse('file://' + '/coding/c#/project1'); bad.scheme === 'file'; bad.path === '/coding/c'; // path is now broken bad.fragment === '/project1'; ``` * * @param path A file system path (see `URI#fsPath`) */ URI.file = function (path) { var authority = _empty; // normalize to fwd-slashes on windows, // on other systems bwd-slashes are valid // filename character, eg /f\oo/ba\r.txt if (__WEBPACK_IMPORTED_MODULE_0__platform_js__["g" /* isWindows */]) { path = path.replace(/\\/g, _slash); } // check for authority as used in UNC shares // or use the path as given if (path[0] === _slash && path[1] === _slash) { var idx = path.indexOf(_slash, 2); if (idx === -1) { authority = path.substring(2); path = _slash; } else { authority = path.substring(2, idx); path = path.substring(idx) || _slash; } } return new _URI('file', authority, path, _empty, _empty); }; URI.from = function (components) { return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment); }; // ---- printing/externalize --------------------------- /** * Creates a string representation for this URI. It's guaranteed that calling * `URI.parse` with the result of this function creates an URI which is equal * to this URI. * * * The result shall *not* be used for display purposes but for externalization or transport. * * The result will be encoded using the percentage encoding and encoding happens mostly * ignore the scheme-specific encoding rules. * * @param skipEncoding Do not encode the result, default is `false` */ URI.prototype.toString = function (skipEncoding) { if (skipEncoding === void 0) { skipEncoding = false; } return _asFormatted(this, skipEncoding); }; URI.prototype.toJSON = function () { return this; }; URI.revive = function (data) { if (!data) { return data; } else if (data instanceof URI) { return data; } else { var result = new _URI(data); result._fsPath = data.fsPath; result._formatted = data.external; return result; } }; return URI; }()); // tslint:disable-next-line:class-name var _URI = /** @class */ (function (_super) { __extends(_URI, _super); function _URI() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._formatted = null; _this._fsPath = null; return _this; } Object.defineProperty(_URI.prototype, "fsPath", { get: function () { if (!this._fsPath) { this._fsPath = _makeFsPath(this); } return this._fsPath; }, enumerable: true, configurable: true }); _URI.prototype.toString = function (skipEncoding) { if (skipEncoding === void 0) { skipEncoding = false; } if (!skipEncoding) { if (!this._formatted) { this._formatted = _asFormatted(this, false); } return this._formatted; } else { // we don't cache that return _asFormatted(this, true); } }; _URI.prototype.toJSON = function () { var res = { $mid: 1 }; // cached state if (this._fsPath) { res.fsPath = this._fsPath; } if (this._formatted) { res.external = this._formatted; } // uri components if (this.path) { res.path = this.path; } if (this.scheme) { res.scheme = this.scheme; } if (this.authority) { res.authority = this.authority; } if (this.query) { res.query = this.query; } if (this.fragment) { res.fragment = this.fragment; } return res; }; return _URI; }(URI)); // reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2 var encodeTable = (_a = {}, _a[58 /* Colon */] = '%3A', _a[47 /* Slash */] = '%2F', _a[63 /* QuestionMark */] = '%3F', _a[35 /* Hash */] = '%23', _a[91 /* OpenSquareBracket */] = '%5B', _a[93 /* CloseSquareBracket */] = '%5D', _a[64 /* AtSign */] = '%40', _a[33 /* ExclamationMark */] = '%21', _a[36 /* DollarSign */] = '%24', _a[38 /* Ampersand */] = '%26', _a[39 /* SingleQuote */] = '%27', _a[40 /* OpenParen */] = '%28', _a[41 /* CloseParen */] = '%29', _a[42 /* Asterisk */] = '%2A', _a[43 /* Plus */] = '%2B', _a[44 /* Comma */] = '%2C', _a[59 /* Semicolon */] = '%3B', _a[61 /* Equals */] = '%3D', _a[32 /* Space */] = '%20', _a); function encodeURIComponentFast(uriComponent, allowSlash) { var res = undefined; var nativeEncodePos = -1; for (var pos = 0; pos < uriComponent.length; pos++) { var code = uriComponent.charCodeAt(pos); // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3 if ((code >= 97 /* a */ && code <= 122 /* z */) || (code >= 65 /* A */ && code <= 90 /* Z */) || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */) || code === 45 /* Dash */ || code === 46 /* Period */ || code === 95 /* Underline */ || code === 126 /* Tilde */ || (allowSlash && code === 47 /* Slash */)) { // check if we are delaying native encode if (nativeEncodePos !== -1) { res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); nativeEncodePos = -1; } // check if we write into a new string (by default we try to return the param) if (res !== undefined) { res += uriComponent.charAt(pos); } } else { // encoding needed, we need to allocate a new string if (res === undefined) { res = uriComponent.substr(0, pos); } // check with default table first var escaped = encodeTable[code]; if (escaped !== undefined) { // check if we are delaying native encode if (nativeEncodePos !== -1) { res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); nativeEncodePos = -1; } // append escaped variant to result res += escaped; } else if (nativeEncodePos === -1) { // use native encode only when needed nativeEncodePos = pos; } } } if (nativeEncodePos !== -1) { res += encodeURIComponent(uriComponent.substring(nativeEncodePos)); } return res !== undefined ? res : uriComponent; } function encodeURIComponentMinimal(path) { var res = undefined; for (var pos = 0; pos < path.length; pos++) { var code = path.charCodeAt(pos); if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) { if (res === undefined) { res = path.substr(0, pos); } res += encodeTable[code]; } else { if (res !== undefined) { res += path[pos]; } } } return res !== undefined ? res : path; } /** * Compute `fsPath` for the given uri */ function _makeFsPath(uri) { var value; if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') { // unc path: file://shares/c$/far/boo value = "//" + uri.authority + uri.path; } else if (uri.path.charCodeAt(0) === 47 /* Slash */ && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */) && uri.path.charCodeAt(2) === 58 /* Colon */) { // windows drive letter: file:///c:/far/boo value = uri.path[1].toLowerCase() + uri.path.substr(2); } else { // other path value = uri.path; } if (__WEBPACK_IMPORTED_MODULE_0__platform_js__["g" /* isWindows */]) { value = value.replace(/\//g, '\\'); } return value; } /** * Create the external version of a uri */ function _asFormatted(uri, skipEncoding) { var encoder = !skipEncoding ? encodeURIComponentFast : encodeURIComponentMinimal; var res = ''; var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment; if (scheme) { res += scheme; res += ':'; } if (authority || scheme === 'file') { res += _slash; res += _slash; } if (authority) { var idx = authority.indexOf('@'); if (idx !== -1) { // @ var userinfo = authority.substr(0, idx); authority = authority.substr(idx + 1); idx = userinfo.indexOf(':'); if (idx === -1) { res += encoder(userinfo, false); } else { // :@ res += encoder(userinfo.substr(0, idx), false); res += ':'; res += encoder(userinfo.substr(idx + 1), false); } res += '@'; } authority = authority.toLowerCase(); idx = authority.indexOf(':'); if (idx === -1) { res += encoder(authority, false); } else { // : res += encoder(authority.substr(0, idx), false); res += authority.substr(idx); } } if (path) { // lower-case windows drive letters in /C:/fff or C:/fff if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) { var code = path.charCodeAt(1); if (code >= 65 /* A */ && code <= 90 /* Z */) { path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3 } } else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) { var code = path.charCodeAt(0); if (code >= 65 /* A */ && code <= 90 /* Z */) { path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3 } } // encode the rest of the path res += encoder(path, true); } if (query) { res += '?'; res += encoder(query, false); } if (fragment) { res += '#'; res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment; } return res; } /***/ }), /***/ 1279: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StandardMouseEvent; }); /* unused harmony export DragMouseEvent */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return StandardWheelEvent; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__browser_js__ = __webpack_require__(1149); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__iframe_js__ = __webpack_require__(1680); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_platform_js__ = __webpack_require__(894); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var StandardMouseEvent = /** @class */ (function () { function StandardMouseEvent(e) { this.timestamp = Date.now(); this.browserEvent = e; this.leftButton = e.button === 0; this.middleButton = e.button === 1; this.rightButton = e.button === 2; this.target = e.target; this.detail = e.detail || 1; if (e.type === 'dblclick') { this.detail = 2; } this.ctrlKey = e.ctrlKey; this.shiftKey = e.shiftKey; this.altKey = e.altKey; this.metaKey = e.metaKey; if (typeof e.pageX === 'number') { this.posx = e.pageX; this.posy = e.pageY; } else { // Probably hit by MSGestureEvent this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } // Find the position of the iframe this code is executing in relative to the iframe where the event was captured. var iframeOffsets = __WEBPACK_IMPORTED_MODULE_1__iframe_js__["a" /* IframeUtils */].getPositionOfChildWindowRelativeToAncestorWindow(self, e.view); this.posx -= iframeOffsets.left; this.posy -= iframeOffsets.top; } StandardMouseEvent.prototype.preventDefault = function () { if (this.browserEvent.preventDefault) { this.browserEvent.preventDefault(); } }; StandardMouseEvent.prototype.stopPropagation = function () { if (this.browserEvent.stopPropagation) { this.browserEvent.stopPropagation(); } }; return StandardMouseEvent; }()); var DragMouseEvent = /** @class */ (function (_super) { __extends(DragMouseEvent, _super); function DragMouseEvent(e) { var _this = _super.call(this, e) || this; _this.dataTransfer = e.dataTransfer; return _this; } return DragMouseEvent; }(StandardMouseEvent)); var StandardWheelEvent = /** @class */ (function () { function StandardWheelEvent(e, deltaX, deltaY) { if (deltaX === void 0) { deltaX = 0; } if (deltaY === void 0) { deltaY = 0; } this.browserEvent = e || null; this.target = e ? (e.target || e.targetNode || e.srcElement) : null; this.deltaY = deltaY; this.deltaX = deltaX; if (e) { var e1 = e; var e2 = e; // vertical delta scroll if (typeof e1.wheelDeltaY !== 'undefined') { this.deltaY = e1.wheelDeltaY / 120; } else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) { this.deltaY = -e2.detail / 3; } // horizontal delta scroll if (typeof e1.wheelDeltaX !== 'undefined') { if (__WEBPACK_IMPORTED_MODULE_0__browser_js__["l" /* isSafari */] && __WEBPACK_IMPORTED_MODULE_2__common_platform_js__["g" /* isWindows */]) { this.deltaX = -(e1.wheelDeltaX / 120); } else { this.deltaX = e1.wheelDeltaX / 120; } } else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) { this.deltaX = -e.detail / 3; } // Assume a vertical scroll if nothing else worked if (this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta) { this.deltaY = e.wheelDelta / 120; } } } StandardWheelEvent.prototype.preventDefault = function () { if (this.browserEvent) { if (this.browserEvent.preventDefault) { this.browserEvent.preventDefault(); } } }; StandardWheelEvent.prototype.stopPropagation = function () { if (this.browserEvent) { if (this.browserEvent.stopPropagation) { this.browserEvent.stopPropagation(); } } }; return StandardWheelEvent; }()); /***/ }), /***/ 1286: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(27); __webpack_require__(1387); //# sourceMappingURL=css.js.map /***/ }), /***/ 1287: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["h"] = blinkingStyleToString; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return TextEditorCursorStyle; }); /* harmony export (immutable) */ __webpack_exports__["i"] = cursorStyleToString; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return InternalEditorOptions; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return EditorOptionsValidator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return InternalEditorOptionsFactory; }); /* unused harmony export EditorLayoutProvider */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return EDITOR_FONT_DEFAULTS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return EDITOR_MODEL_DEFAULTS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EDITOR_DEFAULTS; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nls_js__ = __webpack_require__(936); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_arrays_js__ = __webpack_require__(1202); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__base_common_objects_js__ = __webpack_require__(1288); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__ = __webpack_require__(894); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__model_wordHelper_js__ = __webpack_require__(1440); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; /** * @internal */ function blinkingStyleToString(blinkingStyle) { if (blinkingStyle === 1 /* Blink */) { return 'blink'; } else if (blinkingStyle === 4 /* Expand */) { return 'expand'; } else if (blinkingStyle === 3 /* Phase */) { return 'phase'; } else if (blinkingStyle === 2 /* Smooth */) { return 'smooth'; } else if (blinkingStyle === 5 /* Solid */) { return 'solid'; } else { throw new Error('blinkingStyleToString: Unknown blinkingStyle'); } } /** * The style in which the editor's cursor should be rendered. */ var TextEditorCursorStyle; (function (TextEditorCursorStyle) { /** * As a vertical line (sitting between two characters). */ TextEditorCursorStyle[TextEditorCursorStyle["Line"] = 1] = "Line"; /** * As a block (sitting on top of a character). */ TextEditorCursorStyle[TextEditorCursorStyle["Block"] = 2] = "Block"; /** * As a horizontal line (sitting under a character). */ TextEditorCursorStyle[TextEditorCursorStyle["Underline"] = 3] = "Underline"; /** * As a thin vertical line (sitting between two characters). */ TextEditorCursorStyle[TextEditorCursorStyle["LineThin"] = 4] = "LineThin"; /** * As an outlined block (sitting on top of a character). */ TextEditorCursorStyle[TextEditorCursorStyle["BlockOutline"] = 5] = "BlockOutline"; /** * As a thin horizontal line (sitting under a character). */ TextEditorCursorStyle[TextEditorCursorStyle["UnderlineThin"] = 6] = "UnderlineThin"; })(TextEditorCursorStyle || (TextEditorCursorStyle = {})); /** * @internal */ function cursorStyleToString(cursorStyle) { if (cursorStyle === TextEditorCursorStyle.Line) { return 'line'; } else if (cursorStyle === TextEditorCursorStyle.Block) { return 'block'; } else if (cursorStyle === TextEditorCursorStyle.Underline) { return 'underline'; } else if (cursorStyle === TextEditorCursorStyle.LineThin) { return 'line-thin'; } else if (cursorStyle === TextEditorCursorStyle.BlockOutline) { return 'block-outline'; } else if (cursorStyle === TextEditorCursorStyle.UnderlineThin) { return 'underline-thin'; } else { throw new Error('cursorStyleToString: Unknown cursorStyle'); } } function _cursorStyleFromString(cursorStyle, defaultValue) { if (typeof cursorStyle !== 'string') { return defaultValue; } if (cursorStyle === 'line') { return TextEditorCursorStyle.Line; } else if (cursorStyle === 'block') { return TextEditorCursorStyle.Block; } else if (cursorStyle === 'underline') { return TextEditorCursorStyle.Underline; } else if (cursorStyle === 'line-thin') { return TextEditorCursorStyle.LineThin; } else if (cursorStyle === 'block-outline') { return TextEditorCursorStyle.BlockOutline; } else if (cursorStyle === 'underline-thin') { return TextEditorCursorStyle.UnderlineThin; } return TextEditorCursorStyle.Line; } /** * Internal configuration options (transformed or computed) for the editor. */ var InternalEditorOptions = /** @class */ (function () { /** * @internal */ function InternalEditorOptions(source) { this.canUseLayerHinting = source.canUseLayerHinting; this.pixelRatio = source.pixelRatio; this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight | 0; this.readOnly = source.readOnly; this.accessibilitySupport = source.accessibilitySupport; this.multiCursorModifier = source.multiCursorModifier; this.multiCursorMergeOverlapping = source.multiCursorMergeOverlapping; this.wordSeparators = source.wordSeparators; this.autoClosingBrackets = source.autoClosingBrackets; this.autoClosingQuotes = source.autoClosingQuotes; this.autoSurround = source.autoSurround; this.autoIndent = source.autoIndent; this.useTabStops = source.useTabStops; this.tabFocusMode = source.tabFocusMode; this.dragAndDrop = source.dragAndDrop; this.emptySelectionClipboard = source.emptySelectionClipboard; this.copyWithSyntaxHighlighting = source.copyWithSyntaxHighlighting; this.layoutInfo = source.layoutInfo; this.fontInfo = source.fontInfo; this.viewInfo = source.viewInfo; this.wrappingInfo = source.wrappingInfo; this.contribInfo = source.contribInfo; this.showUnused = source.showUnused; } /** * @internal */ InternalEditorOptions.prototype.equals = function (other) { return (this.canUseLayerHinting === other.canUseLayerHinting && this.pixelRatio === other.pixelRatio && this.editorClassName === other.editorClassName && this.lineHeight === other.lineHeight && this.readOnly === other.readOnly && this.accessibilitySupport === other.accessibilitySupport && this.multiCursorModifier === other.multiCursorModifier && this.multiCursorMergeOverlapping === other.multiCursorMergeOverlapping && this.wordSeparators === other.wordSeparators && this.autoClosingBrackets === other.autoClosingBrackets && this.autoClosingQuotes === other.autoClosingQuotes && this.autoSurround === other.autoSurround && this.autoIndent === other.autoIndent && this.useTabStops === other.useTabStops && this.tabFocusMode === other.tabFocusMode && this.dragAndDrop === other.dragAndDrop && this.showUnused === other.showUnused && this.emptySelectionClipboard === other.emptySelectionClipboard && this.copyWithSyntaxHighlighting === other.copyWithSyntaxHighlighting && InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, other.layoutInfo) && this.fontInfo.equals(other.fontInfo) && InternalEditorOptions._equalsViewOptions(this.viewInfo, other.viewInfo) && InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, other.wrappingInfo) && InternalEditorOptions._equalsContribOptions(this.contribInfo, other.contribInfo)); }; /** * @internal */ InternalEditorOptions.prototype.createChangeEvent = function (newOpts) { return { canUseLayerHinting: (this.canUseLayerHinting !== newOpts.canUseLayerHinting), pixelRatio: (this.pixelRatio !== newOpts.pixelRatio), editorClassName: (this.editorClassName !== newOpts.editorClassName), lineHeight: (this.lineHeight !== newOpts.lineHeight), readOnly: (this.readOnly !== newOpts.readOnly), accessibilitySupport: (this.accessibilitySupport !== newOpts.accessibilitySupport), multiCursorModifier: (this.multiCursorModifier !== newOpts.multiCursorModifier), multiCursorMergeOverlapping: (this.multiCursorMergeOverlapping !== newOpts.multiCursorMergeOverlapping), wordSeparators: (this.wordSeparators !== newOpts.wordSeparators), autoClosingBrackets: (this.autoClosingBrackets !== newOpts.autoClosingBrackets), autoClosingQuotes: (this.autoClosingQuotes !== newOpts.autoClosingQuotes), autoSurround: (this.autoSurround !== newOpts.autoSurround), autoIndent: (this.autoIndent !== newOpts.autoIndent), useTabStops: (this.useTabStops !== newOpts.useTabStops), tabFocusMode: (this.tabFocusMode !== newOpts.tabFocusMode), dragAndDrop: (this.dragAndDrop !== newOpts.dragAndDrop), emptySelectionClipboard: (this.emptySelectionClipboard !== newOpts.emptySelectionClipboard), copyWithSyntaxHighlighting: (this.copyWithSyntaxHighlighting !== newOpts.copyWithSyntaxHighlighting), layoutInfo: (!InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, newOpts.layoutInfo)), fontInfo: (!this.fontInfo.equals(newOpts.fontInfo)), viewInfo: (!InternalEditorOptions._equalsViewOptions(this.viewInfo, newOpts.viewInfo)), wrappingInfo: (!InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, newOpts.wrappingInfo)), contribInfo: (!InternalEditorOptions._equalsContribOptions(this.contribInfo, newOpts.contribInfo)) }; }; /** * @internal */ InternalEditorOptions._equalsLayoutInfo = function (a, b) { return (a.width === b.width && a.height === b.height && a.glyphMarginLeft === b.glyphMarginLeft && a.glyphMarginWidth === b.glyphMarginWidth && a.glyphMarginHeight === b.glyphMarginHeight && a.lineNumbersLeft === b.lineNumbersLeft && a.lineNumbersWidth === b.lineNumbersWidth && a.lineNumbersHeight === b.lineNumbersHeight && a.decorationsLeft === b.decorationsLeft && a.decorationsWidth === b.decorationsWidth && a.decorationsHeight === b.decorationsHeight && a.contentLeft === b.contentLeft && a.contentWidth === b.contentWidth && a.contentHeight === b.contentHeight && a.renderMinimap === b.renderMinimap && a.minimapLeft === b.minimapLeft && a.minimapWidth === b.minimapWidth && a.viewportColumn === b.viewportColumn && a.verticalScrollbarWidth === b.verticalScrollbarWidth && a.horizontalScrollbarHeight === b.horizontalScrollbarHeight && this._equalsOverviewRuler(a.overviewRuler, b.overviewRuler)); }; /** * @internal */ InternalEditorOptions._equalsOverviewRuler = function (a, b) { return (a.width === b.width && a.height === b.height && a.top === b.top && a.right === b.right); }; /** * @internal */ InternalEditorOptions._equalsViewOptions = function (a, b) { return (a.extraEditorClassName === b.extraEditorClassName && a.disableMonospaceOptimizations === b.disableMonospaceOptimizations && __WEBPACK_IMPORTED_MODULE_1__base_common_arrays_js__["d" /* equals */](a.rulers, b.rulers) && a.ariaLabel === b.ariaLabel && a.renderLineNumbers === b.renderLineNumbers && a.renderCustomLineNumbers === b.renderCustomLineNumbers && a.renderFinalNewline === b.renderFinalNewline && a.selectOnLineNumbers === b.selectOnLineNumbers && a.glyphMargin === b.glyphMargin && a.revealHorizontalRightPadding === b.revealHorizontalRightPadding && a.roundedSelection === b.roundedSelection && a.overviewRulerLanes === b.overviewRulerLanes && a.overviewRulerBorder === b.overviewRulerBorder && a.cursorBlinking === b.cursorBlinking && a.mouseWheelZoom === b.mouseWheelZoom && a.cursorSmoothCaretAnimation === b.cursorSmoothCaretAnimation && a.cursorStyle === b.cursorStyle && a.cursorWidth === b.cursorWidth && a.hideCursorInOverviewRuler === b.hideCursorInOverviewRuler && a.scrollBeyondLastLine === b.scrollBeyondLastLine && a.scrollBeyondLastColumn === b.scrollBeyondLastColumn && a.smoothScrolling === b.smoothScrolling && a.stopRenderingLineAfter === b.stopRenderingLineAfter && a.renderWhitespace === b.renderWhitespace && a.renderControlCharacters === b.renderControlCharacters && a.fontLigatures === b.fontLigatures && a.renderIndentGuides === b.renderIndentGuides && a.highlightActiveIndentGuide === b.highlightActiveIndentGuide && a.renderLineHighlight === b.renderLineHighlight && this._equalsScrollbarOptions(a.scrollbar, b.scrollbar) && this._equalsMinimapOptions(a.minimap, b.minimap) && a.fixedOverflowWidgets === b.fixedOverflowWidgets); }; /** * @internal */ InternalEditorOptions._equalsScrollbarOptions = function (a, b) { return (a.arrowSize === b.arrowSize && a.vertical === b.vertical && a.horizontal === b.horizontal && a.useShadows === b.useShadows && a.verticalHasArrows === b.verticalHasArrows && a.horizontalHasArrows === b.horizontalHasArrows && a.handleMouseWheel === b.handleMouseWheel && a.horizontalScrollbarSize === b.horizontalScrollbarSize && a.horizontalSliderSize === b.horizontalSliderSize && a.verticalScrollbarSize === b.verticalScrollbarSize && a.verticalSliderSize === b.verticalSliderSize && a.mouseWheelScrollSensitivity === b.mouseWheelScrollSensitivity && a.fastScrollSensitivity === b.fastScrollSensitivity); }; /** * @internal */ InternalEditorOptions._equalsMinimapOptions = function (a, b) { return (a.enabled === b.enabled && a.side === b.side && a.showSlider === b.showSlider && a.renderCharacters === b.renderCharacters && a.maxColumn === b.maxColumn); }; /** * @internal */ InternalEditorOptions._equalFindOptions = function (a, b) { return (a.seedSearchStringFromSelection === b.seedSearchStringFromSelection && a.autoFindInSelection === b.autoFindInSelection && a.globalFindClipboard === b.globalFindClipboard && a.addExtraSpaceOnTop === b.addExtraSpaceOnTop); }; /** * @internal */ InternalEditorOptions._equalsParameterHintOptions = function (a, b) { return (a.enabled === b.enabled && a.cycle === b.cycle); }; /** * @internal */ InternalEditorOptions._equalsHoverOptions = function (a, b) { return (a.enabled === b.enabled && a.delay === b.delay && a.sticky === b.sticky); }; /** * @internal */ InternalEditorOptions._equalsSuggestOptions = function (a, b) { if (a === b) { return true; } else if (!a || !b) { return false; } else { return a.filterGraceful === b.filterGraceful && a.snippets === b.snippets && a.snippetsPreventQuickSuggestions === b.snippetsPreventQuickSuggestions && a.localityBonus === b.localityBonus && a.shareSuggestSelections === b.shareSuggestSelections; } }; /** * @internal */ InternalEditorOptions._equalsWrappingInfo = function (a, b) { return (a.inDiffEditor === b.inDiffEditor && a.isDominatedByLongLines === b.isDominatedByLongLines && a.isWordWrapMinified === b.isWordWrapMinified && a.isViewportWrapping === b.isViewportWrapping && a.wrappingColumn === b.wrappingColumn && a.wrappingIndent === b.wrappingIndent && a.wordWrapBreakBeforeCharacters === b.wordWrapBreakBeforeCharacters && a.wordWrapBreakAfterCharacters === b.wordWrapBreakAfterCharacters && a.wordWrapBreakObtrusiveCharacters === b.wordWrapBreakObtrusiveCharacters); }; /** * @internal */ InternalEditorOptions._equalsContribOptions = function (a, b) { return (a.selectionClipboard === b.selectionClipboard && this._equalsHoverOptions(a.hover, b.hover) && a.links === b.links && a.contextmenu === b.contextmenu && InternalEditorOptions._equalsQuickSuggestions(a.quickSuggestions, b.quickSuggestions) && a.quickSuggestionsDelay === b.quickSuggestionsDelay && this._equalsParameterHintOptions(a.parameterHints, b.parameterHints) && a.iconsInSuggestions === b.iconsInSuggestions && a.formatOnType === b.formatOnType && a.formatOnPaste === b.formatOnPaste && a.suggestOnTriggerCharacters === b.suggestOnTriggerCharacters && a.acceptSuggestionOnEnter === b.acceptSuggestionOnEnter && a.acceptSuggestionOnCommitCharacter === b.acceptSuggestionOnCommitCharacter && a.wordBasedSuggestions === b.wordBasedSuggestions && a.suggestSelection === b.suggestSelection && a.suggestFontSize === b.suggestFontSize && a.suggestLineHeight === b.suggestLineHeight && a.tabCompletion === b.tabCompletion && this._equalsSuggestOptions(a.suggest, b.suggest) && a.selectionHighlight === b.selectionHighlight && a.occurrencesHighlight === b.occurrencesHighlight && a.codeLens === b.codeLens && a.folding === b.folding && a.foldingStrategy === b.foldingStrategy && a.showFoldingControls === b.showFoldingControls && a.matchBrackets === b.matchBrackets && this._equalFindOptions(a.find, b.find) && a.colorDecorators === b.colorDecorators && __WEBPACK_IMPORTED_MODULE_2__base_common_objects_js__["d" /* equals */](a.codeActionsOnSave, b.codeActionsOnSave) && a.codeActionsOnSaveTimeout === b.codeActionsOnSaveTimeout && a.lightbulbEnabled === b.lightbulbEnabled); }; InternalEditorOptions._equalsQuickSuggestions = function (a, b) { if (typeof a === 'boolean') { if (typeof b !== 'boolean') { return false; } return a === b; } if (typeof b === 'boolean') { return false; } return (a.comments === b.comments && a.other === b.other && a.strings === b.strings); }; return InternalEditorOptions; }()); function _boolean(value, defaultValue) { if (typeof value === 'undefined') { return defaultValue; } if (value === 'false') { // treat the string 'false' as false return false; } return Boolean(value); } function _booleanMap(value, defaultValue) { if (!value) { return defaultValue; } var out = Object.create(null); for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) { var k = _a[_i]; var v = value[k]; if (typeof v === 'boolean') { out[k] = v; } } return out; } function _string(value, defaultValue) { if (typeof value !== 'string') { return defaultValue; } return value; } function _stringSet(value, defaultValue, allowedValues) { if (typeof value !== 'string') { return defaultValue; } if (allowedValues.indexOf(value) === -1) { return defaultValue; } return value; } function _clampedInt(value, defaultValue, minimum, maximum) { var r; if (typeof value === 'undefined') { r = defaultValue; } else { r = parseInt(value, 10); if (isNaN(r)) { r = defaultValue; } } r = Math.max(minimum, r); r = Math.min(maximum, r); return r | 0; } function _float(value, defaultValue) { var r = parseFloat(value); if (isNaN(r)) { r = defaultValue; } return r; } function _wrappingIndentFromString(wrappingIndent, defaultValue) { if (typeof wrappingIndent !== 'string') { return defaultValue; } if (wrappingIndent === 'same') { return 1 /* Same */; } else if (wrappingIndent === 'indent') { return 2 /* Indent */; } else if (wrappingIndent === 'deepIndent') { return 3 /* DeepIndent */; } else { return 0 /* None */; } } function _cursorBlinkingStyleFromString(cursorBlinkingStyle, defaultValue) { if (typeof cursorBlinkingStyle !== 'string') { return defaultValue; } switch (cursorBlinkingStyle) { case 'blink': return 1 /* Blink */; case 'smooth': return 2 /* Smooth */; case 'phase': return 3 /* Phase */; case 'expand': return 4 /* Expand */; case 'visible': // maintain compatibility case 'solid': return 5 /* Solid */; } return 1 /* Blink */; } function _scrollbarVisibilityFromString(visibility, defaultValue) { if (typeof visibility !== 'string') { return defaultValue; } switch (visibility) { case 'hidden': return 2 /* Hidden */; case 'visible': return 3 /* Visible */; default: return 1 /* Auto */; } } /** * @internal */ var EditorOptionsValidator = /** @class */ (function () { function EditorOptionsValidator() { } /** * Validate raw editor options. * i.e. since they can be defined by the user, they might be invalid. */ EditorOptionsValidator.validate = function (opts, defaults) { var wordWrap = opts.wordWrap; { // Compatibility with old true or false values if (wordWrap === true) { wordWrap = 'on'; } else if (wordWrap === false) { wordWrap = 'off'; } wordWrap = _stringSet(wordWrap, defaults.wordWrap, ['off', 'on', 'wordWrapColumn', 'bounded']); } var viewInfo = this._sanitizeViewInfo(opts, defaults.viewInfo); var contribInfo = this._sanitizeContribInfo(opts, defaults.contribInfo); var configuredMulticursorModifier = undefined; if (typeof opts.multiCursorModifier === 'string') { if (opts.multiCursorModifier === 'ctrlCmd') { configuredMulticursorModifier = __WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__["d" /* isMacintosh */] ? 'metaKey' : 'ctrlKey'; } else { configuredMulticursorModifier = 'altKey'; } } var multiCursorModifier = _stringSet(configuredMulticursorModifier, defaults.multiCursorModifier, ['altKey', 'metaKey', 'ctrlKey']); var autoClosingBrackets; var autoClosingQuotes; var autoSurround; if (typeof opts.autoClosingBrackets === 'boolean' && opts.autoClosingBrackets === false) { // backwards compatibility: disable all on boolean false autoClosingBrackets = 'never'; autoClosingQuotes = 'never'; autoSurround = 'never'; } else { autoClosingBrackets = _stringSet(opts.autoClosingBrackets, defaults.autoClosingBrackets, ['always', 'languageDefined', 'beforeWhitespace', 'never']); autoClosingQuotes = _stringSet(opts.autoClosingQuotes, defaults.autoClosingQuotes, ['always', 'languageDefined', 'beforeWhitespace', 'never']); autoSurround = _stringSet(opts.autoSurround, defaults.autoSurround, ['languageDefined', 'brackets', 'quotes', 'never']); } return { inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators), lineNumbersMinChars: _clampedInt(opts.lineNumbersMinChars, defaults.lineNumbersMinChars, 1, 10), lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth), readOnly: _boolean(opts.readOnly, defaults.readOnly), mouseStyle: _stringSet(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), disableLayerHinting: _boolean(opts.disableLayerHinting, defaults.disableLayerHinting), automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout), wordWrap: wordWrap, wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), wordWrapMinified: _boolean(opts.wordWrapMinified, defaults.wordWrapMinified), wrappingIndent: _wrappingIndentFromString(opts.wrappingIndent, defaults.wrappingIndent), wordWrapBreakBeforeCharacters: _string(opts.wordWrapBreakBeforeCharacters, defaults.wordWrapBreakBeforeCharacters), wordWrapBreakAfterCharacters: _string(opts.wordWrapBreakAfterCharacters, defaults.wordWrapBreakAfterCharacters), wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters), autoClosingBrackets: autoClosingBrackets, autoClosingQuotes: autoClosingQuotes, autoSurround: autoSurround, autoIndent: _boolean(opts.autoIndent, defaults.autoIndent), dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), copyWithSyntaxHighlighting: _boolean(opts.copyWithSyntaxHighlighting, defaults.copyWithSyntaxHighlighting), useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), multiCursorModifier: multiCursorModifier, multiCursorMergeOverlapping: _boolean(opts.multiCursorMergeOverlapping, defaults.multiCursorMergeOverlapping), accessibilitySupport: _stringSet(opts.accessibilitySupport, defaults.accessibilitySupport, ['auto', 'on', 'off']), showUnused: _boolean(opts.showUnused, defaults.showUnused), viewInfo: viewInfo, contribInfo: contribInfo, }; }; EditorOptionsValidator._sanitizeScrollbarOpts = function (opts, defaults, mouseWheelScrollSensitivity, fastScrollSensitivity) { if (typeof opts !== 'object') { return defaults; } var horizontalScrollbarSize = _clampedInt(opts.horizontalScrollbarSize, defaults.horizontalScrollbarSize, 0, 1000); var verticalScrollbarSize = _clampedInt(opts.verticalScrollbarSize, defaults.verticalScrollbarSize, 0, 1000); return { vertical: _scrollbarVisibilityFromString(opts.vertical, defaults.vertical), horizontal: _scrollbarVisibilityFromString(opts.horizontal, defaults.horizontal), arrowSize: _clampedInt(opts.arrowSize, defaults.arrowSize, 0, 1000), useShadows: _boolean(opts.useShadows, defaults.useShadows), verticalHasArrows: _boolean(opts.verticalHasArrows, defaults.verticalHasArrows), horizontalHasArrows: _boolean(opts.horizontalHasArrows, defaults.horizontalHasArrows), horizontalScrollbarSize: horizontalScrollbarSize, horizontalSliderSize: _clampedInt(opts.horizontalSliderSize, horizontalScrollbarSize, 0, 1000), verticalScrollbarSize: verticalScrollbarSize, verticalSliderSize: _clampedInt(opts.verticalSliderSize, verticalScrollbarSize, 0, 1000), handleMouseWheel: _boolean(opts.handleMouseWheel, defaults.handleMouseWheel), mouseWheelScrollSensitivity: mouseWheelScrollSensitivity, fastScrollSensitivity: fastScrollSensitivity, }; }; EditorOptionsValidator._sanitizeMinimapOpts = function (opts, defaults) { if (typeof opts !== 'object') { return defaults; } return { enabled: _boolean(opts.enabled, defaults.enabled), side: _stringSet(opts.side, defaults.side, ['right', 'left']), showSlider: _stringSet(opts.showSlider, defaults.showSlider, ['always', 'mouseover']), renderCharacters: _boolean(opts.renderCharacters, defaults.renderCharacters), maxColumn: _clampedInt(opts.maxColumn, defaults.maxColumn, 1, 10000), }; }; EditorOptionsValidator._sanitizeFindOpts = function (opts, defaults) { if (typeof opts !== 'object') { return defaults; } return { seedSearchStringFromSelection: _boolean(opts.seedSearchStringFromSelection, defaults.seedSearchStringFromSelection), autoFindInSelection: _boolean(opts.autoFindInSelection, defaults.autoFindInSelection), globalFindClipboard: _boolean(opts.globalFindClipboard, defaults.globalFindClipboard), addExtraSpaceOnTop: _boolean(opts.addExtraSpaceOnTop, defaults.addExtraSpaceOnTop) }; }; EditorOptionsValidator._sanitizeParameterHintOpts = function (opts, defaults) { if (typeof opts !== 'object') { return defaults; } return { enabled: _boolean(opts.enabled, defaults.enabled), cycle: _boolean(opts.cycle, defaults.cycle) }; }; EditorOptionsValidator._sanitizeHoverOpts = function (_opts, defaults) { var opts; if (typeof _opts === 'boolean') { opts = { enabled: _opts }; } else if (typeof _opts === 'object') { opts = _opts; } else { return defaults; } return { enabled: _boolean(opts.enabled, defaults.enabled), delay: _clampedInt(opts.delay, defaults.delay, 0, 10000), sticky: _boolean(opts.sticky, defaults.sticky) }; }; EditorOptionsValidator._sanitizeSuggestOpts = function (opts, defaults) { var suggestOpts = opts.suggest || {}; return { filterGraceful: _boolean(suggestOpts.filterGraceful, defaults.filterGraceful), snippets: _stringSet(opts.snippetSuggestions, defaults.snippets, ['top', 'bottom', 'inline', 'none']), snippetsPreventQuickSuggestions: _boolean(suggestOpts.snippetsPreventQuickSuggestions, defaults.filterGraceful), localityBonus: _boolean(suggestOpts.localityBonus, defaults.localityBonus), shareSuggestSelections: _boolean(suggestOpts.shareSuggestSelections, defaults.shareSuggestSelections) }; }; EditorOptionsValidator._sanitizeTabCompletionOpts = function (opts, defaults) { if (opts === false) { return 'off'; } else if (opts === true) { return 'onlySnippets'; } else { return _stringSet(opts, defaults, ['on', 'off', 'onlySnippets']); } }; EditorOptionsValidator._sanitizeViewInfo = function (opts, defaults) { var rulers = []; if (Array.isArray(opts.rulers)) { for (var i = 0, len = opts.rulers.length; i < len; i++) { rulers.push(_clampedInt(opts.rulers[i], 0, 0, 10000)); } rulers.sort(); } var renderLineNumbers = defaults.renderLineNumbers; var renderCustomLineNumbers = defaults.renderCustomLineNumbers; if (typeof opts.lineNumbers !== 'undefined') { var lineNumbers = opts.lineNumbers; // Compatibility with old true or false values if (lineNumbers === true) { lineNumbers = 'on'; } else if (lineNumbers === false) { lineNumbers = 'off'; } if (typeof lineNumbers === 'function') { renderLineNumbers = 4 /* Custom */; renderCustomLineNumbers = lineNumbers; } else if (lineNumbers === 'interval') { renderLineNumbers = 3 /* Interval */; } else if (lineNumbers === 'relative') { renderLineNumbers = 2 /* Relative */; } else if (lineNumbers === 'on') { renderLineNumbers = 1 /* On */; } else { renderLineNumbers = 0 /* Off */; } } var fontLigatures = _boolean(opts.fontLigatures, defaults.fontLigatures); var disableMonospaceOptimizations = _boolean(opts.disableMonospaceOptimizations, defaults.disableMonospaceOptimizations) || fontLigatures; var renderWhitespace = opts.renderWhitespace; { // Compatibility with old true or false values if (renderWhitespace === true) { renderWhitespace = 'boundary'; } else if (renderWhitespace === false) { renderWhitespace = 'none'; } renderWhitespace = _stringSet(renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'all']); } var renderLineHighlight = opts.renderLineHighlight; { // Compatibility with old true or false values if (renderLineHighlight === true) { renderLineHighlight = 'line'; } else if (renderLineHighlight === false) { renderLineHighlight = 'none'; } renderLineHighlight = _stringSet(renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']); } var mouseWheelScrollSensitivity = _float(opts.mouseWheelScrollSensitivity, defaults.scrollbar.mouseWheelScrollSensitivity); if (mouseWheelScrollSensitivity === 0) { // Disallow 0, as it would prevent/block scrolling mouseWheelScrollSensitivity = 1; } var fastScrollSensitivity = _float(opts.fastScrollSensitivity, defaults.scrollbar.fastScrollSensitivity); if (fastScrollSensitivity <= 0) { fastScrollSensitivity = defaults.scrollbar.fastScrollSensitivity; } var scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity, fastScrollSensitivity); var minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap); return { extraEditorClassName: _string(opts.extraEditorClassName, defaults.extraEditorClassName), disableMonospaceOptimizations: disableMonospaceOptimizations, rulers: rulers, ariaLabel: _string(opts.ariaLabel, defaults.ariaLabel), renderLineNumbers: renderLineNumbers, renderCustomLineNumbers: renderCustomLineNumbers, renderFinalNewline: _boolean(opts.renderFinalNewline, defaults.renderFinalNewline), selectOnLineNumbers: _boolean(opts.selectOnLineNumbers, defaults.selectOnLineNumbers), glyphMargin: _boolean(opts.glyphMargin, defaults.glyphMargin), revealHorizontalRightPadding: _clampedInt(opts.revealHorizontalRightPadding, defaults.revealHorizontalRightPadding, 0, 1000), roundedSelection: _boolean(opts.roundedSelection, defaults.roundedSelection), overviewRulerLanes: _clampedInt(opts.overviewRulerLanes, defaults.overviewRulerLanes, 0, 3), overviewRulerBorder: _boolean(opts.overviewRulerBorder, defaults.overviewRulerBorder), cursorBlinking: _cursorBlinkingStyleFromString(opts.cursorBlinking, defaults.cursorBlinking), mouseWheelZoom: _boolean(opts.mouseWheelZoom, defaults.mouseWheelZoom), cursorSmoothCaretAnimation: _boolean(opts.cursorSmoothCaretAnimation, defaults.cursorSmoothCaretAnimation), cursorStyle: _cursorStyleFromString(opts.cursorStyle, defaults.cursorStyle), cursorWidth: _clampedInt(opts.cursorWidth, defaults.cursorWidth, 0, Number.MAX_VALUE), hideCursorInOverviewRuler: _boolean(opts.hideCursorInOverviewRuler, defaults.hideCursorInOverviewRuler), scrollBeyondLastLine: _boolean(opts.scrollBeyondLastLine, defaults.scrollBeyondLastLine), scrollBeyondLastColumn: _clampedInt(opts.scrollBeyondLastColumn, defaults.scrollBeyondLastColumn, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), smoothScrolling: _boolean(opts.smoothScrolling, defaults.smoothScrolling), stopRenderingLineAfter: _clampedInt(opts.stopRenderingLineAfter, defaults.stopRenderingLineAfter, -1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), renderWhitespace: renderWhitespace, renderControlCharacters: _boolean(opts.renderControlCharacters, defaults.renderControlCharacters), fontLigatures: fontLigatures, renderIndentGuides: _boolean(opts.renderIndentGuides, defaults.renderIndentGuides), highlightActiveIndentGuide: _boolean(opts.highlightActiveIndentGuide, defaults.highlightActiveIndentGuide), renderLineHighlight: renderLineHighlight, scrollbar: scrollbar, minimap: minimap, fixedOverflowWidgets: _boolean(opts.fixedOverflowWidgets, defaults.fixedOverflowWidgets), }; }; EditorOptionsValidator._sanitizeContribInfo = function (opts, defaults) { var quickSuggestions; if (typeof opts.quickSuggestions === 'object') { quickSuggestions = __assign({ other: true }, opts.quickSuggestions); } else { quickSuggestions = _boolean(opts.quickSuggestions, defaults.quickSuggestions); } // Compatibility support for acceptSuggestionOnEnter if (typeof opts.acceptSuggestionOnEnter === 'boolean') { opts.acceptSuggestionOnEnter = opts.acceptSuggestionOnEnter ? 'on' : 'off'; } var find = this._sanitizeFindOpts(opts.find, defaults.find); return { selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard), hover: this._sanitizeHoverOpts(opts.hover, defaults.hover), links: _boolean(opts.links, defaults.links), contextmenu: _boolean(opts.contextmenu, defaults.contextmenu), quickSuggestions: quickSuggestions, quickSuggestionsDelay: _clampedInt(opts.quickSuggestionsDelay, defaults.quickSuggestionsDelay, -1073741824 /* MIN_SAFE_SMALL_INTEGER */, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), parameterHints: this._sanitizeParameterHintOpts(opts.parameterHints, defaults.parameterHints), iconsInSuggestions: _boolean(opts.iconsInSuggestions, defaults.iconsInSuggestions), formatOnType: _boolean(opts.formatOnType, defaults.formatOnType), formatOnPaste: _boolean(opts.formatOnPaste, defaults.formatOnPaste), suggestOnTriggerCharacters: _boolean(opts.suggestOnTriggerCharacters, defaults.suggestOnTriggerCharacters), acceptSuggestionOnEnter: _stringSet(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter, ['on', 'smart', 'off']), acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter), wordBasedSuggestions: _boolean(opts.wordBasedSuggestions, defaults.wordBasedSuggestions), suggestSelection: _stringSet(opts.suggestSelection, defaults.suggestSelection, ['first', 'recentlyUsed', 'recentlyUsedByPrefix']), suggestFontSize: _clampedInt(opts.suggestFontSize, defaults.suggestFontSize, 0, 1000), suggestLineHeight: _clampedInt(opts.suggestLineHeight, defaults.suggestLineHeight, 0, 1000), tabCompletion: this._sanitizeTabCompletionOpts(opts.tabCompletion, defaults.tabCompletion), suggest: this._sanitizeSuggestOpts(opts, defaults.suggest), selectionHighlight: _boolean(opts.selectionHighlight, defaults.selectionHighlight), occurrencesHighlight: _boolean(opts.occurrencesHighlight, defaults.occurrencesHighlight), codeLens: _boolean(opts.codeLens, defaults.codeLens), folding: _boolean(opts.folding, defaults.folding), foldingStrategy: _stringSet(opts.foldingStrategy, defaults.foldingStrategy, ['auto', 'indentation']), showFoldingControls: _stringSet(opts.showFoldingControls, defaults.showFoldingControls, ['always', 'mouseover']), matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets), find: find, colorDecorators: _boolean(opts.colorDecorators, defaults.colorDecorators), lightbulbEnabled: _boolean(opts.lightbulb ? opts.lightbulb.enabled : false, defaults.lightbulbEnabled), codeActionsOnSave: _booleanMap(opts.codeActionsOnSave, {}), codeActionsOnSaveTimeout: _clampedInt(opts.codeActionsOnSaveTimeout, defaults.codeActionsOnSaveTimeout, 1, 10000) }; }; return EditorOptionsValidator; }()); /** * @internal */ var InternalEditorOptionsFactory = /** @class */ (function () { function InternalEditorOptionsFactory() { } InternalEditorOptionsFactory._tweakValidatedOptions = function (opts, accessibilitySupport) { var accessibilityIsOn = (accessibilitySupport === 2 /* Enabled */); var accessibilityIsOff = (accessibilitySupport === 1 /* Disabled */); return { inDiffEditor: opts.inDiffEditor, wordSeparators: opts.wordSeparators, lineNumbersMinChars: opts.lineNumbersMinChars, lineDecorationsWidth: opts.lineDecorationsWidth, readOnly: opts.readOnly, mouseStyle: opts.mouseStyle, disableLayerHinting: opts.disableLayerHinting, automaticLayout: opts.automaticLayout, wordWrap: opts.wordWrap, wordWrapColumn: opts.wordWrapColumn, wordWrapMinified: opts.wordWrapMinified, wrappingIndent: opts.wrappingIndent, wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters, wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters, wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, autoClosingBrackets: opts.autoClosingBrackets, autoClosingQuotes: opts.autoClosingQuotes, autoSurround: opts.autoSurround, autoIndent: opts.autoIndent, dragAndDrop: opts.dragAndDrop, emptySelectionClipboard: opts.emptySelectionClipboard, copyWithSyntaxHighlighting: opts.copyWithSyntaxHighlighting, useTabStops: opts.useTabStops, multiCursorModifier: opts.multiCursorModifier, multiCursorMergeOverlapping: opts.multiCursorMergeOverlapping, accessibilitySupport: opts.accessibilitySupport, showUnused: opts.showUnused, viewInfo: { extraEditorClassName: opts.viewInfo.extraEditorClassName, disableMonospaceOptimizations: opts.viewInfo.disableMonospaceOptimizations, rulers: opts.viewInfo.rulers, ariaLabel: (accessibilityIsOff ? __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('accessibilityOffAriaLabel', "The editor is not accessible at this time. Press Alt+F1 for options.") : opts.viewInfo.ariaLabel), renderLineNumbers: opts.viewInfo.renderLineNumbers, renderCustomLineNumbers: opts.viewInfo.renderCustomLineNumbers, renderFinalNewline: opts.viewInfo.renderFinalNewline, selectOnLineNumbers: opts.viewInfo.selectOnLineNumbers, glyphMargin: opts.viewInfo.glyphMargin, revealHorizontalRightPadding: opts.viewInfo.revealHorizontalRightPadding, roundedSelection: (accessibilityIsOn ? false : opts.viewInfo.roundedSelection), overviewRulerLanes: opts.viewInfo.overviewRulerLanes, overviewRulerBorder: opts.viewInfo.overviewRulerBorder, cursorBlinking: opts.viewInfo.cursorBlinking, mouseWheelZoom: opts.viewInfo.mouseWheelZoom, cursorSmoothCaretAnimation: opts.viewInfo.cursorSmoothCaretAnimation, cursorStyle: opts.viewInfo.cursorStyle, cursorWidth: opts.viewInfo.cursorWidth, hideCursorInOverviewRuler: opts.viewInfo.hideCursorInOverviewRuler, scrollBeyondLastLine: opts.viewInfo.scrollBeyondLastLine, scrollBeyondLastColumn: opts.viewInfo.scrollBeyondLastColumn, smoothScrolling: opts.viewInfo.smoothScrolling, stopRenderingLineAfter: opts.viewInfo.stopRenderingLineAfter, renderWhitespace: (accessibilityIsOn ? 'none' : opts.viewInfo.renderWhitespace), renderControlCharacters: (accessibilityIsOn ? false : opts.viewInfo.renderControlCharacters), fontLigatures: (accessibilityIsOn ? false : opts.viewInfo.fontLigatures), renderIndentGuides: (accessibilityIsOn ? false : opts.viewInfo.renderIndentGuides), highlightActiveIndentGuide: opts.viewInfo.highlightActiveIndentGuide, renderLineHighlight: opts.viewInfo.renderLineHighlight, scrollbar: opts.viewInfo.scrollbar, minimap: { enabled: (accessibilityIsOn ? false : opts.viewInfo.minimap.enabled), side: opts.viewInfo.minimap.side, renderCharacters: opts.viewInfo.minimap.renderCharacters, showSlider: opts.viewInfo.minimap.showSlider, maxColumn: opts.viewInfo.minimap.maxColumn }, fixedOverflowWidgets: opts.viewInfo.fixedOverflowWidgets }, contribInfo: { selectionClipboard: opts.contribInfo.selectionClipboard, hover: opts.contribInfo.hover, links: (accessibilityIsOn ? false : opts.contribInfo.links), contextmenu: opts.contribInfo.contextmenu, quickSuggestions: opts.contribInfo.quickSuggestions, quickSuggestionsDelay: opts.contribInfo.quickSuggestionsDelay, parameterHints: opts.contribInfo.parameterHints, iconsInSuggestions: opts.contribInfo.iconsInSuggestions, formatOnType: opts.contribInfo.formatOnType, formatOnPaste: opts.contribInfo.formatOnPaste, suggestOnTriggerCharacters: opts.contribInfo.suggestOnTriggerCharacters, acceptSuggestionOnEnter: opts.contribInfo.acceptSuggestionOnEnter, acceptSuggestionOnCommitCharacter: opts.contribInfo.acceptSuggestionOnCommitCharacter, wordBasedSuggestions: opts.contribInfo.wordBasedSuggestions, suggestSelection: opts.contribInfo.suggestSelection, suggestFontSize: opts.contribInfo.suggestFontSize, suggestLineHeight: opts.contribInfo.suggestLineHeight, tabCompletion: opts.contribInfo.tabCompletion, suggest: opts.contribInfo.suggest, selectionHighlight: (accessibilityIsOn ? false : opts.contribInfo.selectionHighlight), occurrencesHighlight: (accessibilityIsOn ? false : opts.contribInfo.occurrencesHighlight), codeLens: (accessibilityIsOn ? false : opts.contribInfo.codeLens), folding: (accessibilityIsOn ? false : opts.contribInfo.folding), foldingStrategy: opts.contribInfo.foldingStrategy, showFoldingControls: opts.contribInfo.showFoldingControls, matchBrackets: (accessibilityIsOn ? false : opts.contribInfo.matchBrackets), find: opts.contribInfo.find, colorDecorators: opts.contribInfo.colorDecorators, lightbulbEnabled: opts.contribInfo.lightbulbEnabled, codeActionsOnSave: opts.contribInfo.codeActionsOnSave, codeActionsOnSaveTimeout: opts.contribInfo.codeActionsOnSaveTimeout } }; }; InternalEditorOptionsFactory.createInternalEditorOptions = function (env, _opts) { var accessibilitySupport; if (_opts.accessibilitySupport === 'auto') { // The editor reads the `accessibilitySupport` from the environment accessibilitySupport = env.accessibilitySupport; } else if (_opts.accessibilitySupport === 'on') { accessibilitySupport = 2 /* Enabled */; } else { accessibilitySupport = 1 /* Disabled */; } // Disable some non critical features to get as best performance as possible // See https://github.com/Microsoft/vscode/issues/26730 var opts = this._tweakValidatedOptions(_opts, accessibilitySupport); var lineDecorationsWidth; if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { var multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2)); lineDecorationsWidth = multiple * env.fontInfo.typicalHalfwidthCharacterWidth; } else { lineDecorationsWidth = _clampedInt(opts.lineDecorationsWidth, 0, 0, 1000); } if (opts.contribInfo.folding) { lineDecorationsWidth += 16; } var layoutInfo = EditorLayoutProvider.compute({ outerWidth: env.outerWidth, outerHeight: env.outerHeight, showGlyphMargin: opts.viewInfo.glyphMargin, lineHeight: env.fontInfo.lineHeight, showLineNumbers: (opts.viewInfo.renderLineNumbers !== 0 /* Off */), lineNumbersMinChars: opts.lineNumbersMinChars, lineNumbersDigitCount: env.lineNumbersDigitCount, lineDecorationsWidth: lineDecorationsWidth, typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth, maxDigitWidth: env.fontInfo.maxDigitWidth, verticalScrollbarWidth: opts.viewInfo.scrollbar.verticalScrollbarSize, horizontalScrollbarHeight: opts.viewInfo.scrollbar.horizontalScrollbarSize, scrollbarArrowSize: opts.viewInfo.scrollbar.arrowSize, verticalScrollbarHasArrows: opts.viewInfo.scrollbar.verticalHasArrows, minimap: opts.viewInfo.minimap.enabled, minimapSide: opts.viewInfo.minimap.side, minimapRenderCharacters: opts.viewInfo.minimap.renderCharacters, minimapMaxColumn: opts.viewInfo.minimap.maxColumn, pixelRatio: env.pixelRatio }); var bareWrappingInfo = null; { var wordWrap = opts.wordWrap; var wordWrapColumn = opts.wordWrapColumn; var wordWrapMinified = opts.wordWrapMinified; if (accessibilitySupport === 2 /* Enabled */) { // See https://github.com/Microsoft/vscode/issues/27766 // Never enable wrapping when a screen reader is attached // because arrow down etc. will not move the cursor in the way // a screen reader expects. bareWrappingInfo = { isWordWrapMinified: false, isViewportWrapping: false, wrappingColumn: -1 }; } else if (wordWrapMinified && env.isDominatedByLongLines) { // Force viewport width wrapping if model is dominated by long lines bareWrappingInfo = { isWordWrapMinified: true, isViewportWrapping: true, wrappingColumn: Math.max(1, layoutInfo.viewportColumn) }; } else if (wordWrap === 'on') { bareWrappingInfo = { isWordWrapMinified: false, isViewportWrapping: true, wrappingColumn: Math.max(1, layoutInfo.viewportColumn) }; } else if (wordWrap === 'bounded') { bareWrappingInfo = { isWordWrapMinified: false, isViewportWrapping: true, wrappingColumn: Math.min(Math.max(1, layoutInfo.viewportColumn), wordWrapColumn) }; } else if (wordWrap === 'wordWrapColumn') { bareWrappingInfo = { isWordWrapMinified: false, isViewportWrapping: false, wrappingColumn: wordWrapColumn }; } else { bareWrappingInfo = { isWordWrapMinified: false, isViewportWrapping: false, wrappingColumn: -1 }; } } var wrappingInfo = { inDiffEditor: opts.inDiffEditor, isDominatedByLongLines: env.isDominatedByLongLines, isWordWrapMinified: bareWrappingInfo.isWordWrapMinified, isViewportWrapping: bareWrappingInfo.isViewportWrapping, wrappingColumn: bareWrappingInfo.wrappingColumn, wrappingIndent: opts.wrappingIndent, wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters, wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters, wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, }; var className = 'monaco-editor'; if (opts.viewInfo.extraEditorClassName) { className += ' ' + opts.viewInfo.extraEditorClassName; } if (env.extraEditorClassName) { className += ' ' + env.extraEditorClassName; } if (opts.viewInfo.fontLigatures) { className += ' enable-ligatures'; } if (opts.mouseStyle === 'default') { className += ' mouse-default'; } else if (opts.mouseStyle === 'copy') { className += ' mouse-copy'; } return new InternalEditorOptions({ canUseLayerHinting: opts.disableLayerHinting ? false : true, pixelRatio: env.pixelRatio, editorClassName: className, lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, accessibilitySupport: accessibilitySupport, multiCursorModifier: opts.multiCursorModifier, multiCursorMergeOverlapping: opts.multiCursorMergeOverlapping, wordSeparators: opts.wordSeparators, autoClosingBrackets: opts.autoClosingBrackets, autoClosingQuotes: opts.autoClosingQuotes, autoSurround: opts.autoSurround, autoIndent: opts.autoIndent, useTabStops: opts.useTabStops, tabFocusMode: opts.readOnly ? true : env.tabFocusMode, dragAndDrop: opts.dragAndDrop, emptySelectionClipboard: opts.emptySelectionClipboard && env.emptySelectionClipboard, copyWithSyntaxHighlighting: opts.copyWithSyntaxHighlighting, layoutInfo: layoutInfo, fontInfo: env.fontInfo, viewInfo: opts.viewInfo, wrappingInfo: wrappingInfo, contribInfo: opts.contribInfo, showUnused: opts.showUnused, }); }; return InternalEditorOptionsFactory; }()); /** * @internal */ var EditorLayoutProvider = /** @class */ (function () { function EditorLayoutProvider() { } EditorLayoutProvider.compute = function (_opts) { var outerWidth = _opts.outerWidth | 0; var outerHeight = _opts.outerHeight | 0; var showGlyphMargin = _opts.showGlyphMargin; var lineHeight = _opts.lineHeight | 0; var showLineNumbers = _opts.showLineNumbers; var lineNumbersMinChars = _opts.lineNumbersMinChars | 0; var lineNumbersDigitCount = _opts.lineNumbersDigitCount | 0; var lineDecorationsWidth = _opts.lineDecorationsWidth | 0; var typicalHalfwidthCharacterWidth = _opts.typicalHalfwidthCharacterWidth; var maxDigitWidth = _opts.maxDigitWidth; var verticalScrollbarWidth = _opts.verticalScrollbarWidth | 0; var verticalScrollbarHasArrows = _opts.verticalScrollbarHasArrows; var scrollbarArrowSize = _opts.scrollbarArrowSize | 0; var horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0; var minimap = _opts.minimap; var minimapSide = _opts.minimapSide; var minimapRenderCharacters = _opts.minimapRenderCharacters; var minimapMaxColumn = _opts.minimapMaxColumn | 0; var pixelRatio = _opts.pixelRatio; var lineNumbersWidth = 0; if (showLineNumbers) { var digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars); lineNumbersWidth = Math.round(digitCount * maxDigitWidth); } var glyphMarginWidth = 0; if (showGlyphMargin) { glyphMarginWidth = lineHeight; } var glyphMarginLeft = 0; var lineNumbersLeft = glyphMarginLeft + glyphMarginWidth; var decorationsLeft = lineNumbersLeft + lineNumbersWidth; var contentLeft = decorationsLeft + lineDecorationsWidth; var remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth; var renderMinimap; var minimapLeft; var minimapWidth; var contentWidth; if (!minimap) { minimapLeft = 0; minimapWidth = 0; renderMinimap = 0 /* None */; contentWidth = remainingWidth; } else { var minimapCharWidth = void 0; if (pixelRatio >= 2) { renderMinimap = minimapRenderCharacters ? 2 /* Large */ : 4 /* LargeBlocks */; minimapCharWidth = 2 / pixelRatio; } else { renderMinimap = minimapRenderCharacters ? 1 /* Small */ : 3 /* SmallBlocks */; minimapCharWidth = 1 / pixelRatio; } // Given: // (leaving 2px for the cursor to have space after the last character) // viewportColumn = (contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth // minimapWidth = viewportColumn * minimapCharWidth // contentWidth = remainingWidth - minimapWidth // What are good values for contentWidth and minimapWidth ? // minimapWidth = ((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth) * minimapCharWidth // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth - 2) * minimapCharWidth // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth - 2) * minimapCharWidth // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth // minimapWidth = ((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth) minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))); var minimapColumns = minimapWidth / minimapCharWidth; if (minimapColumns > minimapMaxColumn) { minimapWidth = Math.floor(minimapMaxColumn * minimapCharWidth); } contentWidth = remainingWidth - minimapWidth; if (minimapSide === 'left') { minimapLeft = 0; glyphMarginLeft += minimapWidth; lineNumbersLeft += minimapWidth; decorationsLeft += minimapWidth; contentLeft += minimapWidth; } else { minimapLeft = outerWidth - minimapWidth - verticalScrollbarWidth; } } // (leaving 2px for the cursor to have space after the last character) var viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth)); var verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0); return { width: outerWidth, height: outerHeight, glyphMarginLeft: glyphMarginLeft, glyphMarginWidth: glyphMarginWidth, glyphMarginHeight: outerHeight, lineNumbersLeft: lineNumbersLeft, lineNumbersWidth: lineNumbersWidth, lineNumbersHeight: outerHeight, decorationsLeft: decorationsLeft, decorationsWidth: lineDecorationsWidth, decorationsHeight: outerHeight, contentLeft: contentLeft, contentWidth: contentWidth, contentHeight: outerHeight, renderMinimap: renderMinimap, minimapLeft: minimapLeft, minimapWidth: minimapWidth, viewportColumn: viewportColumn, verticalScrollbarWidth: verticalScrollbarWidth, horizontalScrollbarHeight: horizontalScrollbarHeight, overviewRuler: { top: verticalArrowSize, width: verticalScrollbarWidth, height: (outerHeight - 2 * verticalArrowSize), right: 0 } }; }; return EditorLayoutProvider; }()); var DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace'; var DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace'; var DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace, \'Droid Sans Fallback\''; /** * @internal */ var EDITOR_FONT_DEFAULTS = { fontFamily: (__WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__["d" /* isMacintosh */] ? DEFAULT_MAC_FONT_FAMILY : (__WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__["c" /* isLinux */] ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)), fontWeight: 'normal', fontSize: (__WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__["d" /* isMacintosh */] ? 12 : 14), lineHeight: 0, letterSpacing: 0, }; /** * @internal */ var EDITOR_MODEL_DEFAULTS = { tabSize: 4, indentSize: 4, insertSpaces: true, detectIndentation: true, trimAutoWhitespace: true, largeFileOptimizations: true }; /** * @internal */ var EDITOR_DEFAULTS = { inDiffEditor: false, wordSeparators: __WEBPACK_IMPORTED_MODULE_4__model_wordHelper_js__["b" /* USUAL_WORD_SEPARATORS */], lineNumbersMinChars: 5, lineDecorationsWidth: 10, readOnly: false, mouseStyle: 'text', disableLayerHinting: false, automaticLayout: false, wordWrap: 'off', wordWrapColumn: 80, wordWrapMinified: true, wrappingIndent: 1 /* Same */, wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++', wordWrapBreakAfterCharacters: ' \t})]?|/&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」', wordWrapBreakObtrusiveCharacters: '.', autoClosingBrackets: 'languageDefined', autoClosingQuotes: 'languageDefined', autoSurround: 'languageDefined', autoIndent: true, dragAndDrop: true, emptySelectionClipboard: true, copyWithSyntaxHighlighting: true, useTabStops: true, multiCursorModifier: 'altKey', multiCursorMergeOverlapping: true, accessibilitySupport: 'auto', showUnused: true, viewInfo: { extraEditorClassName: '', disableMonospaceOptimizations: false, rulers: [], ariaLabel: __WEBPACK_IMPORTED_MODULE_0__nls_js__["a" /* localize */]('editorViewAccessibleLabel', "Editor content"), renderLineNumbers: 1 /* On */, renderCustomLineNumbers: null, renderFinalNewline: (__WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__["c" /* isLinux */] ? false : true), selectOnLineNumbers: true, glyphMargin: true, revealHorizontalRightPadding: 30, roundedSelection: true, overviewRulerLanes: 2, overviewRulerBorder: true, cursorBlinking: 1 /* Blink */, mouseWheelZoom: false, cursorSmoothCaretAnimation: false, cursorStyle: TextEditorCursorStyle.Line, cursorWidth: 0, hideCursorInOverviewRuler: false, scrollBeyondLastLine: true, scrollBeyondLastColumn: 5, smoothScrolling: false, stopRenderingLineAfter: 10000, renderWhitespace: 'none', renderControlCharacters: false, fontLigatures: false, renderIndentGuides: true, highlightActiveIndentGuide: true, renderLineHighlight: 'line', scrollbar: { vertical: 1 /* Auto */, horizontal: 1 /* Auto */, arrowSize: 11, useShadows: true, verticalHasArrows: false, horizontalHasArrows: false, horizontalScrollbarSize: 10, horizontalSliderSize: 10, verticalScrollbarSize: 14, verticalSliderSize: 14, handleMouseWheel: true, mouseWheelScrollSensitivity: 1, fastScrollSensitivity: 5, }, minimap: { enabled: true, side: 'right', showSlider: 'mouseover', renderCharacters: true, maxColumn: 120 }, fixedOverflowWidgets: false, }, contribInfo: { selectionClipboard: true, hover: { enabled: true, delay: 300, sticky: true }, links: true, contextmenu: true, quickSuggestions: { other: true, comments: false, strings: false }, quickSuggestionsDelay: 10, parameterHints: { enabled: true, cycle: false }, iconsInSuggestions: true, formatOnType: false, formatOnPaste: false, suggestOnTriggerCharacters: true, acceptSuggestionOnEnter: 'on', acceptSuggestionOnCommitCharacter: true, wordBasedSuggestions: true, suggestSelection: 'recentlyUsed', suggestFontSize: 0, suggestLineHeight: 0, tabCompletion: 'off', suggest: { filterGraceful: true, snippets: 'inline', snippetsPreventQuickSuggestions: true, localityBonus: false, shareSuggestSelections: false }, selectionHighlight: true, occurrencesHighlight: true, codeLens: true, folding: true, foldingStrategy: 'auto', showFoldingControls: 'mouseover', matchBrackets: true, find: { seedSearchStringFromSelection: true, autoFindInSelection: false, globalFindClipboard: false, addExtraSpaceOnTop: true }, colorDecorators: true, lightbulbEnabled: true, codeActionsOnSave: {}, codeActionsOnSaveTimeout: 750 }, }; /***/ }), /***/ 1288: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = deepClone; /* harmony export (immutable) */ __webpack_exports__["c"] = deepFreeze; /* unused harmony export cloneAndChange */ /* harmony export (immutable) */ __webpack_exports__["f"] = mixin; /* unused harmony export assign */ /* harmony export (immutable) */ __webpack_exports__["d"] = equals; /* harmony export (immutable) */ __webpack_exports__["a"] = createKeywordMatcher; /* harmony export (immutable) */ __webpack_exports__["e"] = getOrDefault; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__types_js__ = __webpack_require__(1057); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ function deepClone(obj) { if (!obj || typeof obj !== 'object') { return obj; } if (obj instanceof RegExp) { // See https://github.com/Microsoft/TypeScript/issues/10990 return obj; } var result = Array.isArray(obj) ? [] : {}; Object.keys(obj).forEach(function (key) { if (obj[key] && typeof obj[key] === 'object') { result[key] = deepClone(obj[key]); } else { result[key] = obj[key]; } }); return result; } function deepFreeze(obj) { if (!obj || typeof obj !== 'object') { return obj; } var stack = [obj]; while (stack.length > 0) { var obj_1 = stack.shift(); Object.freeze(obj_1); for (var key in obj_1) { if (_hasOwnProperty.call(obj_1, key)) { var prop = obj_1[key]; if (typeof prop === 'object' && !Object.isFrozen(prop)) { stack.push(prop); } } } } return obj; } var _hasOwnProperty = Object.prototype.hasOwnProperty; function cloneAndChange(obj, changer) { return _cloneAndChange(obj, changer, new Set()); } function _cloneAndChange(obj, changer, seen) { if (Object(__WEBPACK_IMPORTED_MODULE_0__types_js__["k" /* isUndefinedOrNull */])(obj)) { return obj; } var changed = changer(obj); if (typeof changed !== 'undefined') { return changed; } if (Object(__WEBPACK_IMPORTED_MODULE_0__types_js__["c" /* isArray */])(obj)) { var r1 = []; for (var _i = 0, obj_2 = obj; _i < obj_2.length; _i++) { var e = obj_2[_i]; r1.push(_cloneAndChange(e, changer, seen)); } return r1; } if (Object(__WEBPACK_IMPORTED_MODULE_0__types_js__["h" /* isObject */])(obj)) { if (seen.has(obj)) { throw new Error('Cannot clone recursive data-structure'); } seen.add(obj); var r2 = {}; for (var i2 in obj) { if (_hasOwnProperty.call(obj, i2)) { r2[i2] = _cloneAndChange(obj[i2], changer, seen); } } seen.delete(obj); return r2; } return obj; } /** * Copies all properties of source into destination. The optional parameter "overwrite" allows to control * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite). */ function mixin(destination, source, overwrite) { if (overwrite === void 0) { overwrite = true; } if (!Object(__WEBPACK_IMPORTED_MODULE_0__types_js__["h" /* isObject */])(destination)) { return source; } if (Object(__WEBPACK_IMPORTED_MODULE_0__types_js__["h" /* isObject */])(source)) { Object.keys(source).forEach(function (key) { if (key in destination) { if (overwrite) { if (Object(__WEBPACK_IMPORTED_MODULE_0__types_js__["h" /* isObject */])(destination[key]) && Object(__WEBPACK_IMPORTED_MODULE_0__types_js__["h" /* isObject */])(source[key])) { mixin(destination[key], source[key], overwrite); } else { destination[key] = source[key]; } } } else { destination[key] = source[key]; } }); } return destination; } function assign(destination) { var sources = []; for (var _i = 1; _i < arguments.length; _i++) { sources[_i - 1] = arguments[_i]; } sources.forEach(function (source) { return Object.keys(source).forEach(function (key) { return destination[key] = source[key]; }); }); return destination; } function equals(one, other) { if (one === other) { return true; } if (one === null || one === undefined || other === null || other === undefined) { return false; } if (typeof one !== typeof other) { return false; } if (typeof one !== 'object') { return false; } if ((Array.isArray(one)) !== (Array.isArray(other))) { return false; } var i; var key; if (Array.isArray(one)) { if (one.length !== other.length) { return false; } for (i = 0; i < one.length; i++) { if (!equals(one[i], other[i])) { return false; } } } else { var oneKeys = []; for (key in one) { oneKeys.push(key); } oneKeys.sort(); var otherKeys = []; for (key in other) { otherKeys.push(key); } otherKeys.sort(); if (!equals(oneKeys, otherKeys)) { return false; } for (i = 0; i < oneKeys.length; i++) { if (!equals(one[oneKeys[i]], other[oneKeys[i]])) { return false; } } } return true; } function arrayToHash(array) { var result = {}; for (var _i = 0, array_1 = array; _i < array_1.length; _i++) { var e = array_1[_i]; result[e] = true; } return result; } /** * Given an array of strings, returns a function which, given a string * returns true or false whether the string is in that array. */ function createKeywordMatcher(arr, caseInsensitive) { if (caseInsensitive === void 0) { caseInsensitive = false; } if (caseInsensitive) { arr = arr.map(function (x) { return x.toLowerCase(); }); } var hash = arrayToHash(arr); if (caseInsensitive) { return function (word) { return hash[word.toLowerCase()] !== undefined && hash.hasOwnProperty(word.toLowerCase()); }; } else { return function (word) { return hash[word] !== undefined && hash.hasOwnProperty(word); }; } } function getOrDefault(obj, fn, defaultValue) { var result = fn(obj); return typeof result === 'undefined' ? defaultValue : result; } /***/ }), /***/ 1289: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ICodeEditorService; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__platform_instantiation_common_instantiation_js__ = __webpack_require__(855); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var ICodeEditorService = Object(__WEBPACK_IMPORTED_MODULE_0__platform_instantiation_common_instantiation_js__["c" /* createDecorator */])('codeEditorService'); /***/ }), /***/ 1290: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IConfigurationService; }); /* harmony export (immutable) */ __webpack_exports__["i"] = toValuesTree; /* harmony export (immutable) */ __webpack_exports__["b"] = addToValueTree; /* harmony export (immutable) */ __webpack_exports__["h"] = removeFromValueTree; /* harmony export (immutable) */ __webpack_exports__["d"] = getConfigurationValue; /* harmony export (immutable) */ __webpack_exports__["c"] = getConfigurationKeys; /* harmony export (immutable) */ __webpack_exports__["e"] = getDefaultValues; /* harmony export (immutable) */ __webpack_exports__["g"] = overrideIdentifierFromKey; /* harmony export (immutable) */ __webpack_exports__["f"] = getMigratedSettingValue; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__registry_common_platform_js__ = __webpack_require__(1203); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__instantiation_common_instantiation_js__ = __webpack_require__(855); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__configurationRegistry_js__ = __webpack_require__(1395); var IConfigurationService = Object(__WEBPACK_IMPORTED_MODULE_1__instantiation_common_instantiation_js__["c" /* createDecorator */])('configurationService'); function toValuesTree(properties, conflictReporter) { var root = Object.create(null); for (var key in properties) { addToValueTree(root, key, properties[key], conflictReporter); } return root; } function addToValueTree(settingsTreeRoot, key, value, conflictReporter) { var segments = key.split('.'); var last = segments.pop(); var curr = settingsTreeRoot; for (var i = 0; i < segments.length; i++) { var s = segments[i]; var obj = curr[s]; switch (typeof obj) { case 'undefined': obj = curr[s] = Object.create(null); break; case 'object': break; default: conflictReporter("Ignoring " + key + " as " + segments.slice(0, i + 1).join('.') + " is " + JSON.stringify(obj)); return; } curr = obj; } if (typeof curr === 'object') { curr[last] = value; // workaround https://github.com/Microsoft/vscode/issues/13606 } else { conflictReporter("Ignoring " + key + " as " + segments.join('.') + " is " + JSON.stringify(curr)); } } function removeFromValueTree(valueTree, key) { var segments = key.split('.'); doRemoveFromValueTree(valueTree, segments); } function doRemoveFromValueTree(valueTree, segments) { var first = segments.shift(); if (segments.length === 0) { // Reached last segment delete valueTree[first]; return; } if (Object.keys(valueTree).indexOf(first) !== -1) { var value = valueTree[first]; if (typeof value === 'object' && !Array.isArray(value)) { doRemoveFromValueTree(value, segments); if (Object.keys(value).length === 0) { delete valueTree[first]; } } } } /** * A helper function to get the configuration value with a specific settings path (e.g. config.some.setting) */ function getConfigurationValue(config, settingPath, defaultValue) { function accessSetting(config, path) { var current = config; for (var _i = 0, path_1 = path; _i < path_1.length; _i++) { var component = path_1[_i]; if (typeof current !== 'object' || current === null) { return undefined; } current = current[component]; } return current; } var path = settingPath.split('.'); var result = accessSetting(config, path); return typeof result === 'undefined' ? defaultValue : result; } function getConfigurationKeys() { var properties = __WEBPACK_IMPORTED_MODULE_0__registry_common_platform_js__["a" /* Registry */].as(__WEBPACK_IMPORTED_MODULE_2__configurationRegistry_js__["a" /* Extensions */].Configuration).getConfigurationProperties(); return Object.keys(properties); } function getDefaultValues() { var valueTreeRoot = Object.create(null); var properties = __WEBPACK_IMPORTED_MODULE_0__registry_common_platform_js__["a" /* Registry */].as(__WEBPACK_IMPORTED_MODULE_2__configurationRegistry_js__["a" /* Extensions */].Configuration).getConfigurationProperties(); for (var key in properties) { var value = properties[key].default; addToValueTree(valueTreeRoot, key, value, function (message) { return console.error("Conflict in default settings: " + message); }); } return valueTreeRoot; } function overrideIdentifierFromKey(key) { return key.substring(1, key.length - 1); } function getMigratedSettingValue(configurationService, currentSettingName, legacySettingName) { var setting = configurationService.inspect(currentSettingName); var legacySetting = configurationService.inspect(legacySettingName); if (typeof setting.user !== 'undefined' || typeof setting.workspace !== 'undefined' || typeof setting.workspaceFolder !== 'undefined') { return setting.value; } else if (typeof legacySetting.user !== 'undefined' || typeof legacySetting.workspace !== 'undefined' || typeof legacySetting.workspaceFolder !== 'undefined') { return legacySetting.value; } else { return setting.default; } } /***/ }), /***/ 1291: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Extensions; }); /* harmony export (immutable) */ __webpack_exports__["_3"] = registerColor; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return foreground; }); /* unused harmony export errorForeground */ /* unused harmony export focusBorder */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return contrastBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return activeContrastBorder; }); /* unused harmony export textLinkForeground */ /* unused harmony export textCodeBlockBackground */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_8", function() { return widgetShadow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return inputBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return inputForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return inputBorder; }); /* unused harmony export inputActiveOptionBorder */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return inputValidationInfoBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return inputValidationInfoForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return inputValidationInfoBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return inputValidationWarningBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return inputValidationWarningForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return inputValidationWarningBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return inputValidationErrorBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return inputValidationErrorForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return inputValidationErrorBorder; }); /* unused harmony export selectBackground */ /* unused harmony export selectForeground */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return listFocusBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return listFocusForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return listActiveSelectionBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return listActiveSelectionForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return listInactiveSelectionBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return listInactiveSelectionForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return listInactiveFocusBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return listHoverBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return listHoverForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return listDropBackground; }); /* unused harmony export listHighlightForeground */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return listFilterWidgetBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return listFilterWidgetOutline; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return listFilterWidgetNoMatchesOutline; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_1", function() { return pickerGroupForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_0", function() { return pickerGroupBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return badgeBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return badgeForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_4", function() { return scrollbarShadow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_6", function() { return scrollbarSliderBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_7", function() { return scrollbarSliderHoverBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_5", function() { return scrollbarSliderActiveBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_2", function() { return progressBarBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return menuBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return menuForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return menuBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return menuSelectionForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return menuSelectionBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return menuSelectionBorder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return menuSeparatorBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return editorBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return editorForeground; }); /* unused harmony export editorWidgetBackground */ /* unused harmony export editorWidgetBorder */ /* unused harmony export editorWidgetResizeBorder */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return editorSelectionBackground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return editorSelectionForeground; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return editorInactiveSelection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return editorSelectionHighlight; }); /* unused harmony export editorSelectionHighlightBorder */ /* unused harmony export editorFindMatch */ /* unused harmony export editorFindMatchHighlight */ /* unused harmony export editorFindRangeHighlight */ /* unused harmony export editorFindMatchBorder */ /* unused harmony export editorFindMatchHighlightBorder */ /* unused harmony export editorFindRangeHighlightBorder */ /* unused harmony export editorHoverHighlight */ /* unused harmony export editorHoverBackground */ /* unused harmony export editorHoverBorder */ /* unused harmony export editorHoverStatusBarBackground */ /* unused harmony export editorActiveLinkForeground */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return defaultInsertColor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return defaultRemoveColor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return diffInserted; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return diffRemoved; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return diffInsertedOutline; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return diffRemovedOutline; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return diffBorder; }); /* unused harmony export snippetTabstopHighlightBackground */ /* unused harmony export snippetTabstopHighlightBorder */ /* unused harmony export snippetFinalTabstopHighlightBackground */ /* unused harmony export snippetFinalTabstopHighlightBorder */ /* unused harmony export overviewRulerFindMatchForeground */ /* unused harmony export overviewRulerSelectionHighlightForeground */ /* harmony export (immutable) */ __webpack_exports__["f"] = darken; /* unused harmony export lighten */ /* unused harmony export transparent */ /* unused harmony export oneOf */ /* unused harmony export workbenchColorsSchemaId */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__registry_common_platform_js__ = __webpack_require__(1203); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__ = __webpack_require__(1331); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__base_common_event_js__ = __webpack_require__(833); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__nls_js__ = __webpack_require__(936); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__jsonschemas_common_jsonContributionRegistry_js__ = __webpack_require__(1692); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__base_common_async_js__ = __webpack_require__(1021); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // color registry var Extensions = { ColorContribution: 'base.contributions.colors' }; var ColorRegistry = /** @class */ (function () { function ColorRegistry() { this._onDidChangeSchema = new __WEBPACK_IMPORTED_MODULE_2__base_common_event_js__["a" /* Emitter */](); this.onDidChangeSchema = this._onDidChangeSchema.event; this.colorSchema = { type: 'object', properties: {} }; this.colorReferenceSchema = { type: 'string', enum: [], enumDescriptions: [] }; this.colorsById = {}; } ColorRegistry.prototype.registerColor = function (id, defaults, description, needsTransparency, deprecationMessage) { if (needsTransparency === void 0) { needsTransparency = false; } var colorContribution = { id: id, description: description, defaults: defaults, needsTransparency: needsTransparency, deprecationMessage: deprecationMessage }; this.colorsById[id] = colorContribution; var propertySchema = { type: 'string', description: description, format: 'color-hex', default: '#ff0000' }; if (deprecationMessage) { propertySchema.deprecationMessage = deprecationMessage; } this.colorSchema.properties[id] = propertySchema; this.colorReferenceSchema.enum.push(id); this.colorReferenceSchema.enumDescriptions.push(description); this._onDidChangeSchema.fire(); return id; }; ColorRegistry.prototype.resolveDefaultColor = function (id, theme) { var colorDesc = this.colorsById[id]; if (colorDesc && colorDesc.defaults) { var colorValue = colorDesc.defaults[theme.type]; return resolveColorValue(colorValue, theme); } return undefined; }; ColorRegistry.prototype.getColorSchema = function () { return this.colorSchema; }; ColorRegistry.prototype.toString = function () { var _this = this; var sorter = function (a, b) { var cat1 = a.indexOf('.') === -1 ? 0 : 1; var cat2 = b.indexOf('.') === -1 ? 0 : 1; if (cat1 !== cat2) { return cat1 - cat2; } return a.localeCompare(b); }; return Object.keys(this.colorsById).sort(sorter).map(function (k) { return "- `" + k + "`: " + _this.colorsById[k].description; }).join('\n'); }; return ColorRegistry; }()); var colorRegistry = new ColorRegistry(); __WEBPACK_IMPORTED_MODULE_0__registry_common_platform_js__["a" /* Registry */].add(Extensions.ColorContribution, colorRegistry); function registerColor(id, defaults, description, needsTransparency, deprecationMessage) { return colorRegistry.registerColor(id, defaults, description, needsTransparency, deprecationMessage); } // ----- base colors var foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#616161', hc: '#FFFFFF' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('foreground', "Overall foreground color. This color is only used if not overridden by a component.")); var errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hc: '#F48771' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('errorForeground', "Overall foreground color for error messages. This color is only used if not overridden by a component.")); var focusBorder = registerColor('focusBorder', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#0E639C').transparent(0.8), light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#007ACC').transparent(0.4), hc: '#F38518' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); var contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); var activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); var textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hc: '#3794FF' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('textLinkForeground', "Foreground color for links in text.")); var textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('textCodeBlockBackground', "Background color for code blocks in text.")); // ----- widgets var widgetShadow = registerColor('widget.shadow', { dark: '#000000', light: '#A8A8A8', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); var inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputBoxBackground', "Input box background.")); var inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputBoxForeground', "Input box foreground.")); var inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputBoxBorder', "Input box border.")); var inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); var inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationInfoBackground', "Input validation background color for information severity.")); var inputValidationInfoForeground = registerColor('inputValidation.infoForeground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationInfoForeground', "Input validation foreground color for information severity.")); var inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationInfoBorder', "Input validation border color for information severity.")); var inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationWarningBackground', "Input validation background color for warning severity.")); var inputValidationWarningForeground = registerColor('inputValidation.warningForeground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationWarningForeground', "Input validation foreground color for warning severity.")); var inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationWarningBorder', "Input validation border color for warning severity.")); var inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationErrorBackground', "Input validation background color for error severity.")); var inputValidationErrorForeground = registerColor('inputValidation.errorForeground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationErrorForeground', "Input validation foreground color for error severity.")); var inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('inputValidationErrorBorder', "Input validation border color for error severity.")); var selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('dropdownBackground', "Dropdown background.")); var selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: null, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('dropdownForeground', "Dropdown foreground.")); var listFocusBackground = registerColor('list.focusBackground', { dark: '#062F4A', light: '#D6EBFF', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); var listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listFocusForeground', "List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); var listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#0074E8', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); var listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white, light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); var listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#37373D', light: '#E4E6F1', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); var listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listInactiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); var listInactiveFocusBackground = registerColor('list.inactiveFocusBackground', { dark: '#313135', light: '#d8dae6', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listInactiveFocusBackground', "List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); var listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); var listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listHoverForeground', "List/Tree foreground when hovering over items using the mouse.")); var listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); var listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#0066BF', hc: focusBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); var listFilterWidgetBackground = registerColor('listFilterWidget.background', { light: '#efc1ad', dark: '#653723', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listFilterWidgetBackground', 'Background color of the type filter widget in lists and trees.')); var listFilterWidgetOutline = registerColor('listFilterWidget.outline', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].transparent, light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].transparent, hc: '#f38518' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listFilterWidgetOutline', 'Outline color of the type filter widget in lists and trees.')); var listFilterWidgetNoMatchesOutline = registerColor('listFilterWidget.noMatchesOutline', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('listFilterWidgetNoMatchesOutline', 'Outline color of the type filter widget in lists and trees, when there are no matches.')); var pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: '#3794FF', light: '#0066BF', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('pickerGroupForeground', "Quick picker color for grouping labels.")); var pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('pickerGroupBorder', "Quick picker color for grouping borders.")); var badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#C4C4C4', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('badgeBackground', "Badge background color. Badges are small information labels, e.g. for search results count.")); var badgeForeground = registerColor('badge.foreground', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white, light: '#333', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('badgeForeground', "Badge foreground color. Badges are small information labels, e.g. for search results count.")); var scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); var scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#797979').transparent(0.4), light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('scrollbarSliderBackground', "Scrollbar slider background color.")); var scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#646464').transparent(0.7), light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('scrollbarSliderHoverBackground', "Scrollbar slider background color when hovering.")); var scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#BFBFBF').transparent(0.4), light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#000000').transparent(0.6), hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('scrollbarSliderActiveBackground', "Scrollbar slider background color when clicked on.")); var progressBarBackground = registerColor('progressBar.background', { dark: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#0E70C0'), light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex('#0E70C0'), hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('progressBarBackground', "Background color of the progress bar that can show for long running operations.")); var menuBorder = registerColor('menu.border', { dark: null, light: null, hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('menuBorder', "Border color of menus.")); var menuForeground = registerColor('menu.foreground', { dark: selectForeground, light: foreground, hc: selectForeground }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('menuForeground', "Foreground color of menu items.")); var menuBackground = registerColor('menu.background', { dark: selectBackground, light: selectBackground, hc: selectBackground }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('menuBackground', "Background color of menu items.")); var menuSelectionForeground = registerColor('menu.selectionForeground', { dark: listActiveSelectionForeground, light: listActiveSelectionForeground, hc: listActiveSelectionForeground }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('menuSelectionForeground', "Foreground color of the selected menu item in menus.")); var menuSelectionBackground = registerColor('menu.selectionBackground', { dark: listActiveSelectionBackground, light: listActiveSelectionBackground, hc: listActiveSelectionBackground }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('menuSelectionBackground', "Background color of the selected menu item in menus.")); var menuSelectionBorder = registerColor('menu.selectionBorder', { dark: null, light: null, hc: activeContrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('menuSelectionBorder', "Border color of the selected menu item in menus.")); var menuSeparatorBackground = registerColor('menu.separatorBackground', { dark: '#BBBBBB', light: '#888888', hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('menuSeparatorBackground', "Color of a separator menu item in menus.")); /** * Editor background color. * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254 * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white. */ var editorBackground = registerColor('editor.background', { light: '#fffffe', dark: '#1E1E1E', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].black }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorBackground', "Editor background color.")); /** * Editor foreground color. */ var editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].white }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorForeground', "Editor default foreground color.")); /** * Editor widgets */ var editorWidgetBackground = registerColor('editorWidget.background', { dark: '#252526', light: '#F3F3F3', hc: '#0C141F' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); var editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorWidgetBorder', 'Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.')); var editorWidgetResizeBorder = registerColor('editorWidget.resizeBorder', { light: null, dark: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorWidgetResizeBorder', "Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")); /** * Editor selection colors. */ var editorSelectionBackground = registerColor('editor.selectionBackground', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorSelectionBackground', "Color of the editor selection.")); var editorSelectionForeground = registerColor('editor.selectionForeground', { light: null, dark: null, hc: '#000000' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorSelectionForeground', "Color of the selected text for high contrast.")); var editorInactiveSelection = registerColor('editor.inactiveSelectionBackground', { light: transparent(editorSelectionBackground, 0.5), dark: transparent(editorSelectionBackground, 0.5), hc: transparent(editorSelectionBackground, 0.5) }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorInactiveSelection', "Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."), true); var editorSelectionHighlight = registerColor('editor.selectionHighlightBackground', { light: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorSelectionHighlight', 'Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations.'), true); var editorSelectionHighlightBorder = registerColor('editor.selectionHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorSelectionHighlightBorder', "Border color for regions with the same content as the selection.")); /** * Editor find match colors. */ var editorFindMatch = registerColor('editor.findMatchBackground', { light: '#A8AC94', dark: '#515C6A', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorFindMatch', "Color of the current search match.")); var editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('findMatchHighlight', "Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."), true); var editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('findRangeHighlight', "Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true); var editorFindMatchBorder = registerColor('editor.findMatchBorder', { light: null, dark: null, hc: activeContrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('editorFindMatchBorder', "Border color of the current search match.")); var editorFindMatchHighlightBorder = registerColor('editor.findMatchHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('findMatchHighlightBorder', "Border color of the other search matches.")); var editorFindRangeHighlightBorder = registerColor('editor.findRangeHighlightBorder', { dark: null, light: null, hc: transparent(activeContrastBorder, 0.4) }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('findRangeHighlightBorder', "Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true); /** * Editor hover */ var editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('hoverHighlight', 'Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations.'), true); var editorHoverBackground = registerColor('editorHoverWidget.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('hoverBackground', 'Background color of the editor hover.')); var editorHoverBorder = registerColor('editorHoverWidget.border', { light: editorWidgetBorder, dark: editorWidgetBorder, hc: editorWidgetBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('hoverBorder', 'Border color of the editor hover.')); var editorHoverStatusBarBackground = registerColor('editorHoverWidget.statusBarBackground', { dark: lighten(editorHoverBackground, 0.2), light: darken(editorHoverBackground, 0.05), hc: editorWidgetBackground }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('statusBarBackground', "Background color of the editor hover status bar.")); /** * Editor link colors */ var editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].blue, hc: __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].cyan }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('activeLinkForeground', 'Color of active links.')); /** * Diff Editor Colors */ var defaultInsertColor = new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](155, 185, 85, 0.2)); var defaultRemoveColor = new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](255, 0, 0, 0.2)); var diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('diffEditorInserted', 'Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.'), true); var diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('diffEditorRemoved', 'Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.'), true); var diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); var diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('diffEditorRemovedOutline', 'Outline color for text that got removed.')); var diffBorder = registerColor('diffEditor.border', { dark: null, light: null, hc: contrastBorder }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('diffEditorBorder', 'Border color between the two text editors.')); /** * Snippet placeholder colors */ var snippetTabstopHighlightBackground = registerColor('editor.snippetTabstopHighlightBackground', { dark: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](124, 124, 124, 0.3)), light: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](10, 50, 100, 0.2)), hc: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](124, 124, 124, 0.3)) }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('snippetTabstopHighlightBackground', "Highlight background color of a snippet tabstop.")); var snippetTabstopHighlightBorder = registerColor('editor.snippetTabstopHighlightBorder', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('snippetTabstopHighlightBorder', "Highlight border color of a snippet tabstop.")); var snippetFinalTabstopHighlightBackground = registerColor('editor.snippetFinalTabstopHighlightBackground', { dark: null, light: null, hc: null }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('snippetFinalTabstopHighlightBackground', "Highlight background color of the final tabstop of a snippet.")); var snippetFinalTabstopHighlightBorder = registerColor('editor.snippetFinalTabstopHighlightBorder', { dark: '#525252', light: new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](10, 50, 100, 0.5)), hc: '#525252' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('snippetFinalTabstopHighlightBorder', "Highlight border color of the final stabstop of a snippet.")); var findMatchColorDefault = new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */](new __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["b" /* RGBA */](246, 185, 77, 0.7)); var overviewRulerFindMatchForeground = registerColor('editorOverviewRuler.findMatchForeground', { dark: findMatchColorDefault, light: findMatchColorDefault, hc: findMatchColorDefault }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('overviewRulerFindMatchForeground', 'Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.'), true); var overviewRulerSelectionHighlightForeground = registerColor('editorOverviewRuler.selectionHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, __WEBPACK_IMPORTED_MODULE_3__nls_js__["a" /* localize */]('overviewRulerSelectionHighlightForeground', 'Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.'), true); // ----- color functions function darken(colorValue, factor) { return function (theme) { var color = resolveColorValue(colorValue, theme); if (color) { return color.darken(factor); } return undefined; }; } function lighten(colorValue, factor) { return function (theme) { var color = resolveColorValue(colorValue, theme); if (color) { return color.lighten(factor); } return undefined; }; } function transparent(colorValue, factor) { return function (theme) { var color = resolveColorValue(colorValue, theme); if (color) { return color.transparent(factor); } return undefined; }; } function oneOf() { var colorValues = []; for (var _i = 0; _i < arguments.length; _i++) { colorValues[_i] = arguments[_i]; } return function (theme) { for (var _i = 0, colorValues_1 = colorValues; _i < colorValues_1.length; _i++) { var colorValue = colorValues_1[_i]; var color = resolveColorValue(colorValue, theme); if (color) { return color; } } return undefined; }; } function lessProminent(colorValue, backgroundColorValue, factor, transparency) { return function (theme) { var from = resolveColorValue(colorValue, theme); if (from) { var backgroundColor = resolveColorValue(backgroundColorValue, theme); if (backgroundColor) { if (from.isDarkerThan(backgroundColor)) { return __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].getLighterColor(from, backgroundColor, factor).transparent(transparency); } return __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].getDarkerColor(from, backgroundColor, factor).transparent(transparency); } return from.transparent(factor * transparency); } return undefined; }; } // ----- implementation /** * @param colorValue Resolve a color value in the context of a theme */ function resolveColorValue(colorValue, theme) { if (colorValue === null) { return undefined; } else if (typeof colorValue === 'string') { if (colorValue[0] === '#') { return __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */].fromHex(colorValue); } return theme.getColor(colorValue); } else if (colorValue instanceof __WEBPACK_IMPORTED_MODULE_1__base_common_color_js__["a" /* Color */]) { return colorValue; } else if (typeof colorValue === 'function') { return colorValue(theme); } return undefined; } var workbenchColorsSchemaId = 'vscode://schemas/workbench-colors'; var schemaRegistry = __WEBPACK_IMPORTED_MODULE_0__registry_common_platform_js__["a" /* Registry */].as(__WEBPACK_IMPORTED_MODULE_4__jsonschemas_common_jsonContributionRegistry_js__["a" /* Extensions */].JSONContribution); schemaRegistry.registerSchema(workbenchColorsSchemaId, colorRegistry.getColorSchema()); var delayer = new __WEBPACK_IMPORTED_MODULE_5__base_common_async_js__["c" /* RunOnceScheduler */](function () { return schemaRegistry.notifySchemaChanged(workbenchColorsSchemaId); }, 200); colorRegistry.onDidChangeSchema(function () { if (!delayer.isScheduled()) { delayer.schedule(); } }); // setTimeout(_ => console.log(colorRegistry.toString()), 5000); /***/ }), /***/ 1304: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["e"] = values; /* harmony export (immutable) */ __webpack_exports__["d"] = keys; /* unused harmony export StringIterator */ /* unused harmony export PathIterator */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return TernarySearchTree; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ResourceMap; }); /* unused harmony export LinkedMap */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LRUCache; }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); function values(forEachable) { var result = []; forEachable.forEach(function (value) { return result.push(value); }); return result; } function keys(map) { var result = []; map.forEach(function (value, key) { return result.push(key); }); return result; } var StringIterator = /** @class */ (function () { function StringIterator() { this._value = ''; this._pos = 0; } StringIterator.prototype.reset = function (key) { this._value = key; this._pos = 0; return this; }; StringIterator.prototype.next = function () { this._pos += 1; return this; }; StringIterator.prototype.hasNext = function () { return this._pos < this._value.length - 1; }; StringIterator.prototype.cmp = function (a) { var aCode = a.charCodeAt(0); var thisCode = this._value.charCodeAt(this._pos); return aCode - thisCode; }; StringIterator.prototype.value = function () { return this._value[this._pos]; }; return StringIterator; }()); var PathIterator = /** @class */ (function () { function PathIterator() { } PathIterator.prototype.reset = function (key) { this._value = key.replace(/\\$|\/$/, ''); this._from = 0; this._to = 0; return this.next(); }; PathIterator.prototype.hasNext = function () { return this._to < this._value.length; }; PathIterator.prototype.next = function () { // this._data = key.split(/[\\/]/).filter(s => !!s); this._from = this._to; var justSeps = true; for (; this._to < this._value.length; this._to++) { var ch = this._value.charCodeAt(this._to); if (ch === 47 /* Slash */ || ch === 92 /* Backslash */) { if (justSeps) { this._from++; } else { break; } } else { justSeps = false; } } return this; }; PathIterator.prototype.cmp = function (a) { var aPos = 0; var aLen = a.length; var thisPos = this._from; while (aPos < aLen && thisPos < this._to) { var cmp = a.charCodeAt(aPos) - this._value.charCodeAt(thisPos); if (cmp !== 0) { return cmp; } aPos += 1; thisPos += 1; } if (aLen === this._to - this._from) { return 0; } else if (aPos < aLen) { return -1; } else { return 1; } }; PathIterator.prototype.value = function () { return this._value.substring(this._from, this._to); }; return PathIterator; }()); var TernarySearchTreeNode = /** @class */ (function () { function TernarySearchTreeNode() { } return TernarySearchTreeNode; }()); var TernarySearchTree = /** @class */ (function () { function TernarySearchTree(segments) { this._iter = segments; } TernarySearchTree.forPaths = function () { return new TernarySearchTree(new PathIterator()); }; TernarySearchTree.forStrings = function () { return new TernarySearchTree(new StringIterator()); }; TernarySearchTree.prototype.clear = function () { this._root = undefined; }; TernarySearchTree.prototype.set = function (key, element) { var iter = this._iter.reset(key); var node; if (!this._root) { this._root = new TernarySearchTreeNode(); this._root.segment = iter.value(); } node = this._root; while (true) { var val = iter.cmp(node.segment); if (val > 0) { // left if (!node.left) { node.left = new TernarySearchTreeNode(); node.left.segment = iter.value(); } node = node.left; } else if (val < 0) { // right if (!node.right) { node.right = new TernarySearchTreeNode(); node.right.segment = iter.value(); } node = node.right; } else if (iter.hasNext()) { // mid iter.next(); if (!node.mid) { node.mid = new TernarySearchTreeNode(); node.mid.segment = iter.value(); } node = node.mid; } else { break; } } var oldElement = node.value; node.value = element; node.key = key; return oldElement; }; TernarySearchTree.prototype.get = function (key) { var iter = this._iter.reset(key); var node = this._root; while (node) { var val = iter.cmp(node.segment); if (val > 0) { // left node = node.left; } else if (val < 0) { // right node = node.right; } else if (iter.hasNext()) { // mid iter.next(); node = node.mid; } else { break; } } return node ? node.value : undefined; }; TernarySearchTree.prototype.findSubstr = function (key) { var iter = this._iter.reset(key); var node = this._root; var candidate = undefined; while (node) { var val = iter.cmp(node.segment); if (val > 0) { // left node = node.left; } else if (val < 0) { // right node = node.right; } else if (iter.hasNext()) { // mid iter.next(); candidate = node.value || candidate; node = node.mid; } else { break; } } return node && node.value || candidate; }; TernarySearchTree.prototype.forEach = function (callback) { this._forEach(this._root, callback); }; TernarySearchTree.prototype._forEach = function (node, callback) { if (node) { // left this._forEach(node.left, callback); // node if (node.value) { // callback(node.value, this._iter.join(parts)); callback(node.value, node.key); } // mid this._forEach(node.mid, callback); // right this._forEach(node.right, callback); } }; return TernarySearchTree; }()); var ResourceMap = /** @class */ (function () { function ResourceMap() { this.map = new Map(); this.ignoreCase = false; // in the future this should be an uri-comparator } ResourceMap.prototype.set = function (resource, value) { this.map.set(this.toKey(resource), value); }; ResourceMap.prototype.get = function (resource) { return this.map.get(this.toKey(resource)); }; ResourceMap.prototype.toKey = function (resource) { var key = resource.toString(); if (this.ignoreCase) { key = key.toLowerCase(); } return key; }; return ResourceMap; }()); var LinkedMap = /** @class */ (function () { function LinkedMap() { this._map = new Map(); this._head = undefined; this._tail = undefined; this._size = 0; } LinkedMap.prototype.clear = function () { this._map.clear(); this._head = undefined; this._tail = undefined; this._size = 0; }; Object.defineProperty(LinkedMap.prototype, "size", { get: function () { return this._size; }, enumerable: true, configurable: true }); LinkedMap.prototype.get = function (key, touch) { if (touch === void 0) { touch = 0 /* None */; } var item = this._map.get(key); if (!item) { return undefined; } if (touch !== 0 /* None */) { this.touch(item, touch); } return item.value; }; LinkedMap.prototype.set = function (key, value, touch) { if (touch === void 0) { touch = 0 /* None */; } var item = this._map.get(key); if (item) { item.value = value; if (touch !== 0 /* None */) { this.touch(item, touch); } } else { item = { key: key, value: value, next: undefined, previous: undefined }; switch (touch) { case 0 /* None */: this.addItemLast(item); break; case 1 /* AsOld */: this.addItemFirst(item); break; case 2 /* AsNew */: this.addItemLast(item); break; default: this.addItemLast(item); break; } this._map.set(key, item); this._size++; } }; LinkedMap.prototype.forEach = function (callbackfn, thisArg) { var current = this._head; while (current) { if (thisArg) { callbackfn.bind(thisArg)(current.value, current.key, this); } else { callbackfn(current.value, current.key, this); } current = current.next; } }; /* VS Code / Monaco editor runs on es5 which has no Symbol.iterator keys(): IterableIterator { let current = this._head; let iterator: IterableIterator = { [Symbol.iterator]() { return iterator; }, next():IteratorResult { if (current) { let result = { value: current.key, done: false }; current = current.next; return result; } else { return { value: undefined, done: true }; } } }; return iterator; } values(): IterableIterator { let current = this._head; let iterator: IterableIterator = { [Symbol.iterator]() { return iterator; }, next():IteratorResult { if (current) { let result = { value: current.value, done: false }; current = current.next; return result; } else { return { value: undefined, done: true }; } } }; return iterator; } */ LinkedMap.prototype.trimOld = function (newSize) { if (newSize >= this.size) { return; } if (newSize === 0) { this.clear(); return; } var current = this._head; var currentSize = this.size; while (current && currentSize > newSize) { this._map.delete(current.key); current = current.next; currentSize--; } this._head = current; this._size = currentSize; if (current) { current.previous = undefined; } }; LinkedMap.prototype.addItemFirst = function (item) { // First time Insert if (!this._head && !this._tail) { this._tail = item; } else if (!this._head) { throw new Error('Invalid list'); } else { item.next = this._head; this._head.previous = item; } this._head = item; }; LinkedMap.prototype.addItemLast = function (item) { // First time Insert if (!this._head && !this._tail) { this._head = item; } else if (!this._tail) { throw new Error('Invalid list'); } else { item.previous = this._tail; this._tail.next = item; } this._tail = item; }; LinkedMap.prototype.touch = function (item, touch) { if (!this._head || !this._tail) { throw new Error('Invalid list'); } if ((touch !== 1 /* AsOld */ && touch !== 2 /* AsNew */)) { return; } if (touch === 1 /* AsOld */) { if (item === this._head) { return; } var next = item.next; var previous = item.previous; // Unlink the item if (item === this._tail) { // previous must be defined since item was not head but is tail // So there are more than on item in the map previous.next = undefined; this._tail = previous; } else { // Both next and previous are not undefined since item was neither head nor tail. next.previous = previous; previous.next = next; } // Insert the node at head item.previous = undefined; item.next = this._head; this._head.previous = item; this._head = item; } else if (touch === 2 /* AsNew */) { if (item === this._tail) { return; } var next = item.next; var previous = item.previous; // Unlink the item. if (item === this._head) { // next must be defined since item was not tail but is head // So there are more than on item in the map next.previous = undefined; this._head = next; } else { // Both next and previous are not undefined since item was neither head nor tail. next.previous = previous; previous.next = next; } item.next = undefined; item.previous = this._tail; this._tail.next = item; this._tail = item; } }; LinkedMap.prototype.toJSON = function () { var data = []; this.forEach(function (value, key) { data.push([key, value]); }); return data; }; return LinkedMap; }()); var LRUCache = /** @class */ (function (_super) { __extends(LRUCache, _super); function LRUCache(limit, ratio) { if (ratio === void 0) { ratio = 1; } var _this = _super.call(this) || this; _this._limit = limit; _this._ratio = Math.min(Math.max(0, ratio), 1); return _this; } LRUCache.prototype.get = function (key) { return _super.prototype.get.call(this, key, 2 /* AsNew */); }; LRUCache.prototype.set = function (key, value) { _super.prototype.set.call(this, key, value, 2 /* AsNew */); this.checkTrim(); }; LRUCache.prototype.checkTrim = function () { if (this.size > this._limit) { this.trimOld(Math.round(this._limit * this._ratio)); } }; return LRUCache; }(LinkedMap)); /***/ }), /***/ 1305: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = clearAllFontInfos; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Configuration; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__ = __webpack_require__(1149); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_event_js__ = __webpack_require__(833); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__base_common_lifecycle_js__ = __webpack_require__(825); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__ = __webpack_require__(894); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__charWidthReader_js__ = __webpack_require__(1927); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__elementSizeObserver_js__ = __webpack_require__(1928); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_config_commonEditorConfig_js__ = __webpack_require__(1691); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_config_fontInfo_js__ = __webpack_require__(1562); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var CSSBasedConfigurationCache = /** @class */ (function () { function CSSBasedConfigurationCache() { this._keys = Object.create(null); this._values = Object.create(null); } CSSBasedConfigurationCache.prototype.has = function (item) { var itemId = item.getId(); return !!this._values[itemId]; }; CSSBasedConfigurationCache.prototype.get = function (item) { var itemId = item.getId(); return this._values[itemId]; }; CSSBasedConfigurationCache.prototype.put = function (item, value) { var itemId = item.getId(); this._keys[itemId] = item; this._values[itemId] = value; }; CSSBasedConfigurationCache.prototype.remove = function (item) { var itemId = item.getId(); delete this._keys[itemId]; delete this._values[itemId]; }; CSSBasedConfigurationCache.prototype.getValues = function () { var _this = this; return Object.keys(this._keys).map(function (id) { return _this._values[id]; }); }; return CSSBasedConfigurationCache; }()); function clearAllFontInfos() { CSSBasedConfiguration.INSTANCE.clearCache(); } var CSSBasedConfiguration = /** @class */ (function (_super) { __extends(CSSBasedConfiguration, _super); function CSSBasedConfiguration() { var _this = _super.call(this) || this; _this._onDidChange = _this._register(new __WEBPACK_IMPORTED_MODULE_1__base_common_event_js__["a" /* Emitter */]()); _this.onDidChange = _this._onDidChange.event; _this._cache = new CSSBasedConfigurationCache(); _this._evictUntrustedReadingsTimeout = -1; return _this; } CSSBasedConfiguration.prototype.dispose = function () { if (this._evictUntrustedReadingsTimeout !== -1) { clearTimeout(this._evictUntrustedReadingsTimeout); this._evictUntrustedReadingsTimeout = -1; } _super.prototype.dispose.call(this); }; CSSBasedConfiguration.prototype.clearCache = function () { this._cache = new CSSBasedConfigurationCache(); this._onDidChange.fire(); }; CSSBasedConfiguration.prototype._writeToCache = function (item, value) { var _this = this; this._cache.put(item, value); if (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) { // Try reading again after some time this._evictUntrustedReadingsTimeout = setTimeout(function () { _this._evictUntrustedReadingsTimeout = -1; _this._evictUntrustedReadings(); }, 5000); } }; CSSBasedConfiguration.prototype._evictUntrustedReadings = function () { var values = this._cache.getValues(); var somethingRemoved = false; for (var i = 0, len = values.length; i < len; i++) { var item = values[i]; if (!item.isTrusted) { somethingRemoved = true; this._cache.remove(item); } } if (somethingRemoved) { this._onDidChange.fire(); } }; CSSBasedConfiguration.prototype.readConfiguration = function (bareFontInfo) { if (!this._cache.has(bareFontInfo)) { var readConfig = CSSBasedConfiguration._actualReadConfiguration(bareFontInfo); if (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) { // Hey, it's Bug 14341 ... we couldn't read readConfig = new __WEBPACK_IMPORTED_MODULE_7__common_config_fontInfo_js__["b" /* FontInfo */]({ zoomLevel: __WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["c" /* getZoomLevel */](), fontFamily: readConfig.fontFamily, fontWeight: readConfig.fontWeight, fontSize: readConfig.fontSize, lineHeight: readConfig.lineHeight, letterSpacing: readConfig.letterSpacing, isMonospace: readConfig.isMonospace, typicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5), typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5), canUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow, spaceWidth: Math.max(readConfig.spaceWidth, 5), maxDigitWidth: Math.max(readConfig.maxDigitWidth, 5), }, false); } this._writeToCache(bareFontInfo, readConfig); } return this._cache.get(bareFontInfo); }; CSSBasedConfiguration.createRequest = function (chr, type, all, monospace) { var result = new __WEBPACK_IMPORTED_MODULE_4__charWidthReader_js__["a" /* CharWidthRequest */](chr, type); all.push(result); if (monospace) { monospace.push(result); } return result; }; CSSBasedConfiguration._actualReadConfiguration = function (bareFontInfo) { var all = []; var monospace = []; var typicalHalfwidthCharacter = this.createRequest('n', 0 /* Regular */, all, monospace); var typicalFullwidthCharacter = this.createRequest('\uff4d', 0 /* Regular */, all, null); var space = this.createRequest(' ', 0 /* Regular */, all, monospace); var digit0 = this.createRequest('0', 0 /* Regular */, all, monospace); var digit1 = this.createRequest('1', 0 /* Regular */, all, monospace); var digit2 = this.createRequest('2', 0 /* Regular */, all, monospace); var digit3 = this.createRequest('3', 0 /* Regular */, all, monospace); var digit4 = this.createRequest('4', 0 /* Regular */, all, monospace); var digit5 = this.createRequest('5', 0 /* Regular */, all, monospace); var digit6 = this.createRequest('6', 0 /* Regular */, all, monospace); var digit7 = this.createRequest('7', 0 /* Regular */, all, monospace); var digit8 = this.createRequest('8', 0 /* Regular */, all, monospace); var digit9 = this.createRequest('9', 0 /* Regular */, all, monospace); // monospace test: used for whitespace rendering var rightwardsArrow = this.createRequest('→', 0 /* Regular */, all, monospace); var halfwidthRightwardsArrow = this.createRequest('→', 0 /* Regular */, all, null); this.createRequest('·', 0 /* Regular */, all, monospace); // monospace test: some characters this.createRequest('|', 0 /* Regular */, all, monospace); this.createRequest('/', 0 /* Regular */, all, monospace); this.createRequest('-', 0 /* Regular */, all, monospace); this.createRequest('_', 0 /* Regular */, all, monospace); this.createRequest('i', 0 /* Regular */, all, monospace); this.createRequest('l', 0 /* Regular */, all, monospace); this.createRequest('m', 0 /* Regular */, all, monospace); // monospace italic test this.createRequest('|', 1 /* Italic */, all, monospace); this.createRequest('_', 1 /* Italic */, all, monospace); this.createRequest('i', 1 /* Italic */, all, monospace); this.createRequest('l', 1 /* Italic */, all, monospace); this.createRequest('m', 1 /* Italic */, all, monospace); this.createRequest('n', 1 /* Italic */, all, monospace); // monospace bold test this.createRequest('|', 2 /* Bold */, all, monospace); this.createRequest('_', 2 /* Bold */, all, monospace); this.createRequest('i', 2 /* Bold */, all, monospace); this.createRequest('l', 2 /* Bold */, all, monospace); this.createRequest('m', 2 /* Bold */, all, monospace); this.createRequest('n', 2 /* Bold */, all, monospace); Object(__WEBPACK_IMPORTED_MODULE_4__charWidthReader_js__["b" /* readCharWidths */])(bareFontInfo, all); var maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width); var isMonospace = true; var referenceWidth = monospace[0].width; for (var i = 1, len = monospace.length; i < len; i++) { var diff = referenceWidth - monospace[i].width; if (diff < -0.001 || diff > 0.001) { isMonospace = false; break; } } var canUseHalfwidthRightwardsArrow = true; if (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) { // using a halfwidth rightwards arrow would break monospace... canUseHalfwidthRightwardsArrow = false; } if (halfwidthRightwardsArrow.width > rightwardsArrow.width) { // using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow canUseHalfwidthRightwardsArrow = false; } // let's trust the zoom level only 2s after it was changed. var canTrustBrowserZoomLevel = (__WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["b" /* getTimeSinceLastZoomLevelChanged */]() > 2000); return new __WEBPACK_IMPORTED_MODULE_7__common_config_fontInfo_js__["b" /* FontInfo */]({ zoomLevel: __WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["c" /* getZoomLevel */](), fontFamily: bareFontInfo.fontFamily, fontWeight: bareFontInfo.fontWeight, fontSize: bareFontInfo.fontSize, lineHeight: bareFontInfo.lineHeight, letterSpacing: bareFontInfo.letterSpacing, isMonospace: isMonospace, typicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width, typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width, canUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow, spaceWidth: space.width, maxDigitWidth: maxDigitWidth }, canTrustBrowserZoomLevel); }; CSSBasedConfiguration.INSTANCE = new CSSBasedConfiguration(); return CSSBasedConfiguration; }(__WEBPACK_IMPORTED_MODULE_2__base_common_lifecycle_js__["a" /* Disposable */])); var Configuration = /** @class */ (function (_super) { __extends(Configuration, _super); function Configuration(options, referenceDomElement, accessibilityService) { if (referenceDomElement === void 0) { referenceDomElement = null; } var _this = _super.call(this, options) || this; _this.accessibilityService = accessibilityService; _this._elementSizeObserver = _this._register(new __WEBPACK_IMPORTED_MODULE_5__elementSizeObserver_js__["a" /* ElementSizeObserver */](referenceDomElement, function () { return _this._onReferenceDomElementSizeChanged(); })); _this._register(CSSBasedConfiguration.INSTANCE.onDidChange(function () { return _this._onCSSBasedConfigurationChanged(); })); if (_this._validatedOptions.automaticLayout) { _this._elementSizeObserver.startObserving(); } _this._register(__WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["o" /* onDidChangeZoomLevel */](function (_) { return _this._recomputeOptions(); })); _this._register(_this.accessibilityService.onDidChangeAccessibilitySupport(function () { return _this._recomputeOptions(); })); _this._recomputeOptions(); return _this; } Configuration.applyFontInfoSlow = function (domNode, fontInfo) { domNode.style.fontFamily = fontInfo.getMassagedFontFamily(); domNode.style.fontWeight = fontInfo.fontWeight; domNode.style.fontSize = fontInfo.fontSize + 'px'; domNode.style.lineHeight = fontInfo.lineHeight + 'px'; domNode.style.letterSpacing = fontInfo.letterSpacing + 'px'; }; Configuration.applyFontInfo = function (domNode, fontInfo) { domNode.setFontFamily(fontInfo.getMassagedFontFamily()); domNode.setFontWeight(fontInfo.fontWeight); domNode.setFontSize(fontInfo.fontSize); domNode.setLineHeight(fontInfo.lineHeight); domNode.setLetterSpacing(fontInfo.letterSpacing); }; Configuration.prototype._onReferenceDomElementSizeChanged = function () { this._recomputeOptions(); }; Configuration.prototype._onCSSBasedConfigurationChanged = function () { this._recomputeOptions(); }; Configuration.prototype.observeReferenceElement = function (dimension) { this._elementSizeObserver.observe(dimension); }; Configuration.prototype.dispose = function () { _super.prototype.dispose.call(this); }; Configuration.prototype._getExtraEditorClassName = function () { var extra = ''; if (!__WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["l" /* isSafari */] && !__WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["n" /* isWebkitWebView */]) { // Use user-select: none in all browsers except Safari and native macOS WebView extra += 'no-user-select '; } if (__WEBPACK_IMPORTED_MODULE_3__base_common_platform_js__["d" /* isMacintosh */]) { extra += 'mac '; } return extra; }; Configuration.prototype._getEnvConfiguration = function () { return { extraEditorClassName: this._getExtraEditorClassName(), outerWidth: this._elementSizeObserver.getWidth(), outerHeight: this._elementSizeObserver.getHeight(), emptySelectionClipboard: __WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["m" /* isWebKit */] || __WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["i" /* isFirefox */], pixelRatio: __WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["a" /* getPixelRatio */](), zoomLevel: __WEBPACK_IMPORTED_MODULE_0__base_browser_browser_js__["c" /* getZoomLevel */](), accessibilitySupport: this.accessibilityService.getAccessibilitySupport() }; }; Configuration.prototype.readConfiguration = function (bareFontInfo) { return CSSBasedConfiguration.INSTANCE.readConfiguration(bareFontInfo); }; return Configuration; }(__WEBPACK_IMPORTED_MODULE_6__common_config_commonEditorConfig_js__["a" /* CommonEditorConfiguration */])); /***/ }), /***/ 1323: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StandardKeyboardEvent; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__browser_js__ = __webpack_require__(1149); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_keyCodes_js__ = __webpack_require__(1356); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_platform_js__ = __webpack_require__(894); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var KEY_CODE_MAP = new Array(230); var INVERSE_KEY_CODE_MAP = new Array(112 /* MAX_VALUE */); (function () { for (var i = 0; i < INVERSE_KEY_CODE_MAP.length; i++) { INVERSE_KEY_CODE_MAP[i] = -1; } function define(code, keyCode) { KEY_CODE_MAP[code] = keyCode; INVERSE_KEY_CODE_MAP[keyCode] = code; } define(3, 7 /* PauseBreak */); // VK_CANCEL 0x03 Control-break processing define(8, 1 /* Backspace */); define(9, 2 /* Tab */); define(13, 3 /* Enter */); define(16, 4 /* Shift */); define(17, 5 /* Ctrl */); define(18, 6 /* Alt */); define(19, 7 /* PauseBreak */); define(20, 8 /* CapsLock */); define(27, 9 /* Escape */); define(32, 10 /* Space */); define(33, 11 /* PageUp */); define(34, 12 /* PageDown */); define(35, 13 /* End */); define(36, 14 /* Home */); define(37, 15 /* LeftArrow */); define(38, 16 /* UpArrow */); define(39, 17 /* RightArrow */); define(40, 18 /* DownArrow */); define(45, 19 /* Insert */); define(46, 20 /* Delete */); define(48, 21 /* KEY_0 */); define(49, 22 /* KEY_1 */); define(50, 23 /* KEY_2 */); define(51, 24 /* KEY_3 */); define(52, 25 /* KEY_4 */); define(53, 26 /* KEY_5 */); define(54, 27 /* KEY_6 */); define(55, 28 /* KEY_7 */); define(56, 29 /* KEY_8 */); define(57, 30 /* KEY_9 */); define(65, 31 /* KEY_A */); define(66, 32 /* KEY_B */); define(67, 33 /* KEY_C */); define(68, 34 /* KEY_D */); define(69, 35 /* KEY_E */); define(70, 36 /* KEY_F */); define(71, 37 /* KEY_G */); define(72, 38 /* KEY_H */); define(73, 39 /* KEY_I */); define(74, 40 /* KEY_J */); define(75, 41 /* KEY_K */); define(76, 42 /* KEY_L */); define(77, 43 /* KEY_M */); define(78, 44 /* KEY_N */); define(79, 45 /* KEY_O */); define(80, 46 /* KEY_P */); define(81, 47 /* KEY_Q */); define(82, 48 /* KEY_R */); define(83, 49 /* KEY_S */); define(84, 50 /* KEY_T */); define(85, 51 /* KEY_U */); define(86, 52 /* KEY_V */); define(87, 53 /* KEY_W */); define(88, 54 /* KEY_X */); define(89, 55 /* KEY_Y */); define(90, 56 /* KEY_Z */); define(93, 58 /* ContextMenu */); define(96, 93 /* NUMPAD_0 */); define(97, 94 /* NUMPAD_1 */); define(98, 95 /* NUMPAD_2 */); define(99, 96 /* NUMPAD_3 */); define(100, 97 /* NUMPAD_4 */); define(101, 98 /* NUMPAD_5 */); define(102, 99 /* NUMPAD_6 */); define(103, 100 /* NUMPAD_7 */); define(104, 101 /* NUMPAD_8 */); define(105, 102 /* NUMPAD_9 */); define(106, 103 /* NUMPAD_MULTIPLY */); define(107, 104 /* NUMPAD_ADD */); define(108, 105 /* NUMPAD_SEPARATOR */); define(109, 106 /* NUMPAD_SUBTRACT */); define(110, 107 /* NUMPAD_DECIMAL */); define(111, 108 /* NUMPAD_DIVIDE */); define(112, 59 /* F1 */); define(113, 60 /* F2 */); define(114, 61 /* F3 */); define(115, 62 /* F4 */); define(116, 63 /* F5 */); define(117, 64 /* F6 */); define(118, 65 /* F7 */); define(119, 66 /* F8 */); define(120, 67 /* F9 */); define(121, 68 /* F10 */); define(122, 69 /* F11 */); define(123, 70 /* F12 */); define(124, 71 /* F13 */); define(125, 72 /* F14 */); define(126, 73 /* F15 */); define(127, 74 /* F16 */); define(128, 75 /* F17 */); define(129, 76 /* F18 */); define(130, 77 /* F19 */); define(144, 78 /* NumLock */); define(145, 79 /* ScrollLock */); define(186, 80 /* US_SEMICOLON */); define(187, 81 /* US_EQUAL */); define(188, 82 /* US_COMMA */); define(189, 83 /* US_MINUS */); define(190, 84 /* US_DOT */); define(191, 85 /* US_SLASH */); define(192, 86 /* US_BACKTICK */); define(193, 110 /* ABNT_C1 */); define(194, 111 /* ABNT_C2 */); define(219, 87 /* US_OPEN_SQUARE_BRACKET */); define(220, 88 /* US_BACKSLASH */); define(221, 89 /* US_CLOSE_SQUARE_BRACKET */); define(222, 90 /* US_QUOTE */); define(223, 91 /* OEM_8 */); define(226, 92 /* OEM_102 */); /** * https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html * If an Input Method Editor is processing key input and the event is keydown, return 229. */ define(229, 109 /* KEY_IN_COMPOSITION */); if (__WEBPACK_IMPORTED_MODULE_0__browser_js__["j" /* isIE */]) { define(91, 57 /* Meta */); } else if (__WEBPACK_IMPORTED_MODULE_0__browser_js__["i" /* isFirefox */]) { define(59, 80 /* US_SEMICOLON */); define(107, 81 /* US_EQUAL */); define(109, 83 /* US_MINUS */); if (__WEBPACK_IMPORTED_MODULE_2__common_platform_js__["d" /* isMacintosh */]) { define(224, 57 /* Meta */); } } else if (__WEBPACK_IMPORTED_MODULE_0__browser_js__["m" /* isWebKit */]) { define(91, 57 /* Meta */); if (__WEBPACK_IMPORTED_MODULE_2__common_platform_js__["d" /* isMacintosh */]) { // the two meta keys in the Mac have different key codes (91 and 93) define(93, 57 /* Meta */); } else { define(92, 57 /* Meta */); } } })(); function extractKeyCode(e) { if (e.charCode) { // "keypress" events mostly var char = String.fromCharCode(e.charCode).toUpperCase(); return __WEBPACK_IMPORTED_MODULE_1__common_keyCodes_js__["b" /* KeyCodeUtils */].fromString(char); } return KEY_CODE_MAP[e.keyCode] || 0 /* Unknown */; } var ctrlKeyMod = (__WEBPACK_IMPORTED_MODULE_2__common_platform_js__["d" /* isMacintosh */] ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */); var altKeyMod = 512 /* Alt */; var shiftKeyMod = 1024 /* Shift */; var metaKeyMod = (__WEBPACK_IMPORTED_MODULE_2__common_platform_js__["d" /* isMacintosh */] ? 2048 /* CtrlCmd */ : 256 /* WinCtrl */); var StandardKeyboardEvent = /** @class */ (function () { function StandardKeyboardEvent(source) { this._standardKeyboardEventBrand = true; var e = source; this.browserEvent = e; this.target = e.target; this.ctrlKey = e.ctrlKey; this.shiftKey = e.shiftKey; this.altKey = e.altKey; this.metaKey = e.metaKey; this.keyCode = extractKeyCode(e); this.code = e.code; // console.info(e.type + ": keyCode: " + e.keyCode + ", which: " + e.which + ", charCode: " + e.charCode + ", detail: " + e.detail + " ====> " + this.keyCode + ' -- ' + KeyCode[this.keyCode]); this.ctrlKey = this.ctrlKey || this.keyCode === 5 /* Ctrl */; this.altKey = this.altKey || this.keyCode === 6 /* Alt */; this.shiftKey = this.shiftKey || this.keyCode === 4 /* Shift */; this.metaKey = this.metaKey || this.keyCode === 57 /* Meta */; this._asKeybinding = this._computeKeybinding(); this._asRuntimeKeybinding = this._computeRuntimeKeybinding(); // console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`); } StandardKeyboardEvent.prototype.preventDefault = function () { if (this.browserEvent && this.browserEvent.preventDefault) { this.browserEvent.preventDefault(); } }; StandardKeyboardEvent.prototype.stopPropagation = function () { if (this.browserEvent && this.browserEvent.stopPropagation) { this.browserEvent.stopPropagation(); } }; StandardKeyboardEvent.prototype.toKeybinding = function () { return this._asRuntimeKeybinding; }; StandardKeyboardEvent.prototype.equals = function (other) { return this._asKeybinding === other; }; StandardKeyboardEvent.prototype._computeKeybinding = function () { var key = 0 /* Unknown */; if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) { key = this.keyCode; } var result = 0; if (this.ctrlKey) { result |= ctrlKeyMod; } if (this.altKey) { result |= altKeyMod; } if (this.shiftKey) { result |= shiftKeyMod; } if (this.metaKey) { result |= metaKeyMod; } result |= key; return result; }; StandardKeyboardEvent.prototype._computeRuntimeKeybinding = function () { var key = 0 /* Unknown */; if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) { key = this.keyCode; } return new __WEBPACK_IMPORTED_MODULE_1__common_keyCodes_js__["e" /* SimpleKeybinding */](this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, key); }; return StandardKeyboardEvent; }()); /***/ }), /***/ 1324: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = isThemeColor; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EditorType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Handler; }); /** * @internal */ function isThemeColor(o) { return o && typeof o.id === 'string'; } /** * The type of the `IEditor`. */ var EditorType = { ICodeEditor: 'vs.editor.ICodeEditor', IDiffEditor: 'vs.editor.IDiffEditor' }; /** * Built-in commands. * @internal */ var Handler = { ExecuteCommand: 'executeCommand', ExecuteCommands: 'executeCommands', Type: 'type', ReplacePreviousChar: 'replacePreviousChar', CompositionStart: 'compositionStart', CompositionEnd: 'compositionEnd', Paste: 'paste', Cut: 'cut', Undo: 'undo', Redo: 'redo', }; /***/ }), /***/ 1325: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return OverviewRulerLane; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return TextModelResolvedOptions; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return FindMatch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ApplyEditsResult; }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ /** * Vertical Lane in the overview ruler of the editor. */ var OverviewRulerLane; (function (OverviewRulerLane) { OverviewRulerLane[OverviewRulerLane["Left"] = 1] = "Left"; OverviewRulerLane[OverviewRulerLane["Center"] = 2] = "Center"; OverviewRulerLane[OverviewRulerLane["Right"] = 4] = "Right"; OverviewRulerLane[OverviewRulerLane["Full"] = 7] = "Full"; })(OverviewRulerLane || (OverviewRulerLane = {})); var TextModelResolvedOptions = /** @class */ (function () { /** * @internal */ function TextModelResolvedOptions(src) { this.tabSize = src.tabSize | 0; this.indentSize = src.tabSize | 0; this.insertSpaces = Boolean(src.insertSpaces); this.defaultEOL = src.defaultEOL | 0; this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace); } /** * @internal */ TextModelResolvedOptions.prototype.equals = function (other) { return (this.tabSize === other.tabSize && this.indentSize === other.indentSize && this.insertSpaces === other.insertSpaces && this.defaultEOL === other.defaultEOL && this.trimAutoWhitespace === other.trimAutoWhitespace); }; /** * @internal */ TextModelResolvedOptions.prototype.createChangeEvent = function (newOpts) { return { tabSize: this.tabSize !== newOpts.tabSize, indentSize: this.indentSize !== newOpts.indentSize, insertSpaces: this.insertSpaces !== newOpts.insertSpaces, trimAutoWhitespace: this.trimAutoWhitespace !== newOpts.trimAutoWhitespace, }; }; return TextModelResolvedOptions; }()); var FindMatch = /** @class */ (function () { /** * @internal */ function FindMatch(range, matches) { this.range = range; this.matches = matches; } return FindMatch; }()); /** * @internal */ var ApplyEditsResult = /** @class */ (function () { function ApplyEditsResult(reverseEdits, changes, trimAutoWhitespaceLineNumbers) { this.reverseEdits = reverseEdits; this.changes = changes; this.trimAutoWhitespaceLineNumbers = trimAutoWhitespaceLineNumbers; } return ApplyEditsResult; }()); /***/ }), /***/ 1326: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return NULL_STATE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NULL_MODE_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NULL_LANGUAGE_IDENTIFIER; }); /* harmony export (immutable) */ __webpack_exports__["d"] = nullTokenize; /* harmony export (immutable) */ __webpack_exports__["e"] = nullTokenize2; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_token_js__ = __webpack_require__(1441); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__modes_js__ = __webpack_require__(1044); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var NullStateImpl = /** @class */ (function () { function NullStateImpl() { } NullStateImpl.prototype.clone = function () { return this; }; NullStateImpl.prototype.equals = function (other) { return (this === other); }; return NullStateImpl; }()); var NULL_STATE = new NullStateImpl(); var NULL_MODE_ID = 'vs.editor.nullMode'; var NULL_LANGUAGE_IDENTIFIER = new __WEBPACK_IMPORTED_MODULE_1__modes_js__["o" /* LanguageIdentifier */](NULL_MODE_ID, 0 /* Null */); function nullTokenize(modeId, buffer, state, deltaOffset) { return new __WEBPACK_IMPORTED_MODULE_0__core_token_js__["b" /* TokenizationResult */]([new __WEBPACK_IMPORTED_MODULE_0__core_token_js__["a" /* Token */](deltaOffset, '', modeId)], state); } function nullTokenize2(languageId, buffer, state, deltaOffset) { var tokens = new Uint32Array(2); tokens[0] = deltaOffset; tokens[1] = ((languageId << 0 /* LANGUAGEID_OFFSET */) | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */) | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */) | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */) | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0; return new __WEBPACK_IMPORTED_MODULE_0__core_token_js__["c" /* TokenizationResult2 */](tokens, state === null ? NULL_STATE : state); } /***/ }), /***/ 1327: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export RichEditSupport */ /* unused harmony export LanguageConfigurationChangeEvent */ /* unused harmony export LanguageConfigurationRegistryImpl */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LanguageConfigurationRegistry; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__ = __webpack_require__(956); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_event_js__ = __webpack_require__(833); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__base_common_lifecycle_js__ = __webpack_require__(825); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__ = __webpack_require__(847); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_range_js__ = __webpack_require__(846); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__model_wordHelper_js__ = __webpack_require__(1440); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__ = __webpack_require__(1394); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__supports_js__ = __webpack_require__(1564); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__supports_characterPair_js__ = __webpack_require__(1900); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__supports_electricCharacter_js__ = __webpack_require__(1901); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__supports_indentRules_js__ = __webpack_require__(1902); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__supports_onEnter_js__ = __webpack_require__(1903); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__supports_richEditBrackets_js__ = __webpack_require__(1565); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var RichEditSupport = /** @class */ (function () { function RichEditSupport(languageIdentifier, previous, rawConf) { this._languageIdentifier = languageIdentifier; this._brackets = null; this._electricCharacter = null; var prev = null; if (previous) { prev = previous._conf; } this._conf = RichEditSupport._mergeConf(prev, rawConf); this.onEnter = RichEditSupport._handleOnEnter(this._conf); this.comments = RichEditSupport._handleComments(this._conf); this.characterPair = new __WEBPACK_IMPORTED_MODULE_8__supports_characterPair_js__["a" /* CharacterPairSupport */](this._conf); this.wordDefinition = this._conf.wordPattern || __WEBPACK_IMPORTED_MODULE_5__model_wordHelper_js__["a" /* DEFAULT_WORD_REGEXP */]; this.indentationRules = this._conf.indentationRules; if (this._conf.indentationRules) { this.indentRulesSupport = new __WEBPACK_IMPORTED_MODULE_10__supports_indentRules_js__["a" /* IndentRulesSupport */](this._conf.indentationRules); } this.foldingRules = this._conf.folding || {}; } Object.defineProperty(RichEditSupport.prototype, "brackets", { get: function () { if (!this._brackets && this._conf.brackets) { this._brackets = new __WEBPACK_IMPORTED_MODULE_12__supports_richEditBrackets_js__["b" /* RichEditBrackets */](this._languageIdentifier, this._conf.brackets); } return this._brackets; }, enumerable: true, configurable: true }); Object.defineProperty(RichEditSupport.prototype, "electricCharacter", { get: function () { if (!this._electricCharacter) { var autoClosingPairs = []; if (this._conf.autoClosingPairs) { autoClosingPairs = this._conf.autoClosingPairs; } else if (this._conf.brackets) { autoClosingPairs = this._conf.brackets.map(function (b) { return { open: b[0], close: b[1] }; }); } this._electricCharacter = new __WEBPACK_IMPORTED_MODULE_9__supports_electricCharacter_js__["a" /* BracketElectricCharacterSupport */](this.brackets, autoClosingPairs, this._conf.__electricCharacterSupport); } return this._electricCharacter; }, enumerable: true, configurable: true }); RichEditSupport._mergeConf = function (prev, current) { return { comments: (prev ? current.comments || prev.comments : current.comments), brackets: (prev ? current.brackets || prev.brackets : current.brackets), wordPattern: (prev ? current.wordPattern || prev.wordPattern : current.wordPattern), indentationRules: (prev ? current.indentationRules || prev.indentationRules : current.indentationRules), onEnterRules: (prev ? current.onEnterRules || prev.onEnterRules : current.onEnterRules), autoClosingPairs: (prev ? current.autoClosingPairs || prev.autoClosingPairs : current.autoClosingPairs), surroundingPairs: (prev ? current.surroundingPairs || prev.surroundingPairs : current.surroundingPairs), autoCloseBefore: (prev ? current.autoCloseBefore || prev.autoCloseBefore : current.autoCloseBefore), folding: (prev ? current.folding || prev.folding : current.folding), __electricCharacterSupport: (prev ? current.__electricCharacterSupport || prev.__electricCharacterSupport : current.__electricCharacterSupport), }; }; RichEditSupport._handleOnEnter = function (conf) { // on enter var onEnter = {}; var empty = true; if (conf.brackets) { empty = false; onEnter.brackets = conf.brackets; } if (conf.indentationRules) { empty = false; } if (conf.onEnterRules) { empty = false; onEnter.regExpRules = conf.onEnterRules; } if (!empty) { return new __WEBPACK_IMPORTED_MODULE_11__supports_onEnter_js__["a" /* OnEnterSupport */](onEnter); } return null; }; RichEditSupport._handleComments = function (conf) { var commentRule = conf.comments; if (!commentRule) { return null; } // comment configuration var comments = {}; if (commentRule.lineComment) { comments.lineCommentToken = commentRule.lineComment; } if (commentRule.blockComment) { var _a = commentRule.blockComment, blockStart = _a[0], blockEnd = _a[1]; comments.blockCommentStartToken = blockStart; comments.blockCommentEndToken = blockEnd; } return comments; }; return RichEditSupport; }()); var LanguageConfigurationChangeEvent = /** @class */ (function () { function LanguageConfigurationChangeEvent() { } return LanguageConfigurationChangeEvent; }()); var LanguageConfigurationRegistryImpl = /** @class */ (function () { function LanguageConfigurationRegistryImpl() { this._onDidChange = new __WEBPACK_IMPORTED_MODULE_1__base_common_event_js__["a" /* Emitter */](); this.onDidChange = this._onDidChange.event; this._entries = []; } LanguageConfigurationRegistryImpl.prototype.register = function (languageIdentifier, configuration) { var _this = this; var previous = this._getRichEditSupport(languageIdentifier.id); var current = new RichEditSupport(languageIdentifier, previous, configuration); this._entries[languageIdentifier.id] = current; this._onDidChange.fire({ languageIdentifier: languageIdentifier }); return Object(__WEBPACK_IMPORTED_MODULE_2__base_common_lifecycle_js__["e" /* toDisposable */])(function () { if (_this._entries[languageIdentifier.id] === current) { _this._entries[languageIdentifier.id] = previous; _this._onDidChange.fire({ languageIdentifier: languageIdentifier }); } }); }; LanguageConfigurationRegistryImpl.prototype._getRichEditSupport = function (languageId) { return this._entries[languageId] || null; }; // begin electricCharacter LanguageConfigurationRegistryImpl.prototype._getElectricCharacterSupport = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return null; } return value.electricCharacter || null; }; LanguageConfigurationRegistryImpl.prototype.getElectricCharacters = function (languageId) { var electricCharacterSupport = this._getElectricCharacterSupport(languageId); if (!electricCharacterSupport) { return []; } return electricCharacterSupport.getElectricCharacters(); }; /** * Should return opening bracket type to match indentation with */ LanguageConfigurationRegistryImpl.prototype.onElectricCharacter = function (character, context, column) { var scopedLineTokens = Object(__WEBPACK_IMPORTED_MODULE_7__supports_js__["a" /* createScopedLineTokens */])(context, column - 1); var electricCharacterSupport = this._getElectricCharacterSupport(scopedLineTokens.languageId); if (!electricCharacterSupport) { return null; } return electricCharacterSupport.onElectricCharacter(character, scopedLineTokens, column - scopedLineTokens.firstCharOffset); }; // end electricCharacter LanguageConfigurationRegistryImpl.prototype.getComments = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return null; } return value.comments || null; }; // begin characterPair LanguageConfigurationRegistryImpl.prototype._getCharacterPairSupport = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return null; } return value.characterPair || null; }; LanguageConfigurationRegistryImpl.prototype.getAutoClosingPairs = function (languageId) { var characterPairSupport = this._getCharacterPairSupport(languageId); if (!characterPairSupport) { return []; } return characterPairSupport.getAutoClosingPairs(); }; LanguageConfigurationRegistryImpl.prototype.getAutoCloseBeforeSet = function (languageId) { var characterPairSupport = this._getCharacterPairSupport(languageId); if (!characterPairSupport) { return __WEBPACK_IMPORTED_MODULE_8__supports_characterPair_js__["a" /* CharacterPairSupport */].DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED; } return characterPairSupport.getAutoCloseBeforeSet(); }; LanguageConfigurationRegistryImpl.prototype.getSurroundingPairs = function (languageId) { var characterPairSupport = this._getCharacterPairSupport(languageId); if (!characterPairSupport) { return []; } return characterPairSupport.getSurroundingPairs(); }; LanguageConfigurationRegistryImpl.prototype.shouldAutoClosePair = function (character, context, column) { var scopedLineTokens = Object(__WEBPACK_IMPORTED_MODULE_7__supports_js__["a" /* createScopedLineTokens */])(context, column - 1); var characterPairSupport = this._getCharacterPairSupport(scopedLineTokens.languageId); if (!characterPairSupport) { return false; } return characterPairSupport.shouldAutoClosePair(character, scopedLineTokens, column - scopedLineTokens.firstCharOffset); }; // end characterPair LanguageConfigurationRegistryImpl.prototype.getWordDefinition = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return Object(__WEBPACK_IMPORTED_MODULE_5__model_wordHelper_js__["c" /* ensureValidWordDefinition */])(null); } return Object(__WEBPACK_IMPORTED_MODULE_5__model_wordHelper_js__["c" /* ensureValidWordDefinition */])(value.wordDefinition || null); }; LanguageConfigurationRegistryImpl.prototype.getFoldingRules = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return {}; } return value.foldingRules; }; // begin Indent Rules LanguageConfigurationRegistryImpl.prototype.getIndentRulesSupport = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return null; } return value.indentRulesSupport || null; }; /** * Get nearest preceiding line which doesn't match unIndentPattern or contains all whitespace. * Result: * -1: run into the boundary of embedded languages * 0: every line above are invalid * else: nearest preceding line of the same language */ LanguageConfigurationRegistryImpl.prototype.getPrecedingValidLine = function (model, lineNumber, indentRulesSupport) { var languageID = model.getLanguageIdAtPosition(lineNumber, 0); if (lineNumber > 1) { var lastLineNumber = void 0; var resultLineNumber = -1; for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) { if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) { return resultLineNumber; } var text = model.getLineContent(lastLineNumber); if (indentRulesSupport.shouldIgnore(text) || /^\s+$/.test(text) || text === '') { resultLineNumber = lastLineNumber; continue; } return lastLineNumber; } } return -1; }; /** * Get inherited indentation from above lines. * 1. Find the nearest preceding line which doesn't match unIndentedLinePattern. * 2. If this line matches indentNextLinePattern or increaseIndentPattern, it means that the indent level of `lineNumber` should be 1 greater than this line. * 3. If this line doesn't match any indent rules * a. check whether the line above it matches indentNextLinePattern * b. If not, the indent level of this line is the result * c. If so, it means the indent of this line is *temporary*, go upward utill we find a line whose indent is not temporary (the same workflow a -> b -> c). * 4. Otherwise, we fail to get an inherited indent from aboves. Return null and we should not touch the indent of `lineNumber` * * This function only return the inherited indent based on above lines, it doesn't check whether current line should decrease or not. */ LanguageConfigurationRegistryImpl.prototype.getInheritIndentForLine = function (model, lineNumber, honorIntentialIndent) { if (honorIntentialIndent === void 0) { honorIntentialIndent = true; } var indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id); if (!indentRulesSupport) { return null; } if (lineNumber <= 1) { return { indentation: '', action: null }; } var precedingUnIgnoredLine = this.getPrecedingValidLine(model, lineNumber, indentRulesSupport); if (precedingUnIgnoredLine < 0) { return null; } else if (precedingUnIgnoredLine < 1) { return { indentation: '', action: null }; } var precedingUnIgnoredLineContent = model.getLineContent(precedingUnIgnoredLine); if (indentRulesSupport.shouldIncrease(precedingUnIgnoredLineContent) || indentRulesSupport.shouldIndentNextLine(precedingUnIgnoredLineContent)) { return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](precedingUnIgnoredLineContent), action: __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent, line: precedingUnIgnoredLine }; } else if (indentRulesSupport.shouldDecrease(precedingUnIgnoredLineContent)) { return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](precedingUnIgnoredLineContent), action: null, line: precedingUnIgnoredLine }; } else { // precedingUnIgnoredLine can not be ignored. // it doesn't increase indent of following lines // it doesn't increase just next line // so current line is not affect by precedingUnIgnoredLine // and then we should get a correct inheritted indentation from above lines if (precedingUnIgnoredLine === 1) { return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](model.getLineContent(precedingUnIgnoredLine)), action: null, line: precedingUnIgnoredLine }; } var previousLine = precedingUnIgnoredLine - 1; var previousLineIndentMetadata = indentRulesSupport.getIndentMetadata(model.getLineContent(previousLine)); if (!(previousLineIndentMetadata & (1 /* INCREASE_MASK */ | 2 /* DECREASE_MASK */)) && (previousLineIndentMetadata & 4 /* INDENT_NEXTLINE_MASK */)) { var stopLine = 0; for (var i = previousLine - 1; i > 0; i--) { if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { continue; } stopLine = i; break; } return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](model.getLineContent(stopLine + 1)), action: null, line: stopLine + 1 }; } if (honorIntentialIndent) { return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](model.getLineContent(precedingUnIgnoredLine)), action: null, line: precedingUnIgnoredLine }; } else { // search from precedingUnIgnoredLine until we find one whose indent is not temporary for (var i = precedingUnIgnoredLine; i > 0; i--) { var lineContent = model.getLineContent(i); if (indentRulesSupport.shouldIncrease(lineContent)) { return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](lineContent), action: __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent, line: i }; } else if (indentRulesSupport.shouldIndentNextLine(lineContent)) { var stopLine = 0; for (var j = i - 1; j > 0; j--) { if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { continue; } stopLine = j; break; } return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](model.getLineContent(stopLine + 1)), action: null, line: stopLine + 1 }; } else if (indentRulesSupport.shouldDecrease(lineContent)) { return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](lineContent), action: null, line: i }; } } return { indentation: __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](model.getLineContent(1)), action: null, line: 1 }; } } }; LanguageConfigurationRegistryImpl.prototype.getGoodIndentForLine = function (virtualModel, languageId, lineNumber, indentConverter) { var indentRulesSupport = this.getIndentRulesSupport(languageId); if (!indentRulesSupport) { return null; } var indent = this.getInheritIndentForLine(virtualModel, lineNumber); var lineContent = virtualModel.getLineContent(lineNumber); if (indent) { var inheritLine = indent.line; if (inheritLine !== undefined) { var onEnterSupport = this._getOnEnterSupport(languageId); var enterResult = null; try { if (onEnterSupport) { enterResult = onEnterSupport.onEnter('', virtualModel.getLineContent(inheritLine), ''); } } catch (e) { Object(__WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__["e" /* onUnexpectedError */])(e); } if (enterResult) { var indentation = __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](virtualModel.getLineContent(inheritLine)); if (enterResult.removeText) { indentation = indentation.substring(0, indentation.length - enterResult.removeText); } if ((enterResult.indentAction === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent) || (enterResult.indentAction === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].IndentOutdent)) { indentation = indentConverter.shiftIndent(indentation); } else if (enterResult.indentAction === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Outdent) { indentation = indentConverter.unshiftIndent(indentation); } if (indentRulesSupport.shouldDecrease(lineContent)) { indentation = indentConverter.unshiftIndent(indentation); } if (enterResult.appendText) { indentation += enterResult.appendText; } return __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](indentation); } } if (indentRulesSupport.shouldDecrease(lineContent)) { if (indent.action === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent) { return indent.indentation; } else { return indentConverter.unshiftIndent(indent.indentation); } } else { if (indent.action === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent) { return indentConverter.shiftIndent(indent.indentation); } else { return indent.indentation; } } } return null; }; LanguageConfigurationRegistryImpl.prototype.getIndentForEnter = function (model, range, indentConverter, autoIndent) { model.forceTokenization(range.startLineNumber); var lineTokens = model.getLineTokens(range.startLineNumber); var beforeEnterText; var afterEnterText; var scopedLineTokens = Object(__WEBPACK_IMPORTED_MODULE_7__supports_js__["a" /* createScopedLineTokens */])(lineTokens, range.startColumn - 1); var scopedLineText = scopedLineTokens.getLineContent(); var embeddedLanguage = false; if (scopedLineTokens.firstCharOffset > 0 && lineTokens.getLanguageId(0) !== scopedLineTokens.languageId) { // we are in the embeded language content embeddedLanguage = true; // if embeddedLanguage is true, then we don't touch the indentation of current line beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); } else { beforeEnterText = lineTokens.getLineContent().substring(0, range.startColumn - 1); } if (range.isEmpty()) { afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); } else { var endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); } var indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId); if (!indentRulesSupport) { return null; } var beforeEnterResult = beforeEnterText; var beforeEnterIndent = __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](beforeEnterText); if (!autoIndent && !embeddedLanguage) { var beforeEnterIndentAction = this.getInheritIndentForLine(model, range.startLineNumber); if (indentRulesSupport.shouldDecrease(beforeEnterText)) { if (beforeEnterIndentAction) { beforeEnterIndent = beforeEnterIndentAction.indentation; if (beforeEnterIndentAction.action !== __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent) { beforeEnterIndent = indentConverter.unshiftIndent(beforeEnterIndent); } } } beforeEnterResult = beforeEnterIndent + __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["y" /* ltrim */](__WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["y" /* ltrim */](beforeEnterText, ' '), '\t'); } var virtualModel = { getLineTokens: function (lineNumber) { return model.getLineTokens(lineNumber); }, getLanguageIdentifier: function () { return model.getLanguageIdentifier(); }, getLanguageIdAtPosition: function (lineNumber, column) { return model.getLanguageIdAtPosition(lineNumber, column); }, getLineContent: function (lineNumber) { if (lineNumber === range.startLineNumber) { return beforeEnterResult; } else { return model.getLineContent(lineNumber); } } }; var currentLineIndent = __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](lineTokens.getLineContent()); var afterEnterAction = this.getInheritIndentForLine(virtualModel, range.startLineNumber + 1); if (!afterEnterAction) { var beforeEnter = embeddedLanguage ? currentLineIndent : beforeEnterIndent; return { beforeEnter: beforeEnter, afterEnter: beforeEnter }; } var afterEnterIndent = embeddedLanguage ? currentLineIndent : afterEnterAction.indentation; if (afterEnterAction.action === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent) { afterEnterIndent = indentConverter.shiftIndent(afterEnterIndent); } if (indentRulesSupport.shouldDecrease(afterEnterText)) { afterEnterIndent = indentConverter.unshiftIndent(afterEnterIndent); } return { beforeEnter: embeddedLanguage ? currentLineIndent : beforeEnterIndent, afterEnter: afterEnterIndent }; }; /** * We should always allow intentional indentation. It means, if users change the indentation of `lineNumber` and the content of * this line doesn't match decreaseIndentPattern, we should not adjust the indentation. */ LanguageConfigurationRegistryImpl.prototype.getIndentActionForType = function (model, range, ch, indentConverter) { var scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); var indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId); if (!indentRulesSupport) { return null; } var scopedLineText = scopedLineTokens.getLineContent(); var beforeTypeText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); var afterTypeText; // selection support if (range.isEmpty()) { afterTypeText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); } else { var endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); afterTypeText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); } // If previous content already matches decreaseIndentPattern, it means indentation of this line should already be adjusted // Users might change the indentation by purpose and we should honor that instead of readjusting. if (!indentRulesSupport.shouldDecrease(beforeTypeText + afterTypeText) && indentRulesSupport.shouldDecrease(beforeTypeText + ch + afterTypeText)) { // after typing `ch`, the content matches decreaseIndentPattern, we should adjust the indent to a good manner. // 1. Get inherited indent action var r = this.getInheritIndentForLine(model, range.startLineNumber, false); if (!r) { return null; } var indentation = r.indentation; if (r.action !== __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent) { indentation = indentConverter.unshiftIndent(indentation); } return indentation; } return null; }; LanguageConfigurationRegistryImpl.prototype.getIndentMetadata = function (model, lineNumber) { var indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id); if (!indentRulesSupport) { return null; } if (lineNumber < 1 || lineNumber > model.getLineCount()) { return null; } return indentRulesSupport.getIndentMetadata(model.getLineContent(lineNumber)); }; // end Indent Rules // begin onEnter LanguageConfigurationRegistryImpl.prototype._getOnEnterSupport = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return null; } return value.onEnter || null; }; LanguageConfigurationRegistryImpl.prototype.getRawEnterActionAtPosition = function (model, lineNumber, column) { var r = this.getEnterAction(model, new __WEBPACK_IMPORTED_MODULE_4__core_range_js__["a" /* Range */](lineNumber, column, lineNumber, column)); return r ? r.enterAction : null; }; LanguageConfigurationRegistryImpl.prototype.getEnterAction = function (model, range) { var indentation = this.getIndentationAtPosition(model, range.startLineNumber, range.startColumn); var scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); var onEnterSupport = this._getOnEnterSupport(scopedLineTokens.languageId); if (!onEnterSupport) { return null; } var scopedLineText = scopedLineTokens.getLineContent(); var beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); var afterEnterText; // selection support if (range.isEmpty()) { afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); } else { var endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); } var lineNumber = range.startLineNumber; var oneLineAboveText = ''; if (lineNumber > 1 && scopedLineTokens.firstCharOffset === 0) { // This is not the first line and the entire line belongs to this mode var oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, lineNumber - 1); if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) { // The line above ends with text belonging to the same mode oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent(); } } var enterResult = null; try { enterResult = onEnterSupport.onEnter(oneLineAboveText, beforeEnterText, afterEnterText); } catch (e) { Object(__WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__["e" /* onUnexpectedError */])(e); } if (!enterResult) { return null; } else { // Here we add `\t` to appendText first because enterAction is leveraging appendText and removeText to change indentation. if (!enterResult.appendText) { if ((enterResult.indentAction === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].Indent) || (enterResult.indentAction === __WEBPACK_IMPORTED_MODULE_6__languageConfiguration_js__["a" /* IndentAction */].IndentOutdent)) { enterResult.appendText = '\t'; } else { enterResult.appendText = ''; } } } if (enterResult.removeText) { indentation = indentation.substring(0, indentation.length - enterResult.removeText); } return { enterAction: enterResult, indentation: indentation, }; }; LanguageConfigurationRegistryImpl.prototype.getIndentationAtPosition = function (model, lineNumber, column) { var lineText = model.getLineContent(lineNumber); var indentation = __WEBPACK_IMPORTED_MODULE_3__base_common_strings_js__["p" /* getLeadingWhitespace */](lineText); if (indentation.length > column - 1) { indentation = indentation.substring(0, column - 1); } return indentation; }; LanguageConfigurationRegistryImpl.prototype.getScopedLineTokens = function (model, lineNumber, columnNumber) { model.forceTokenization(lineNumber); var lineTokens = model.getLineTokens(lineNumber); var column = (typeof columnNumber === 'undefined' ? model.getLineMaxColumn(lineNumber) - 1 : columnNumber - 1); var scopedLineTokens = Object(__WEBPACK_IMPORTED_MODULE_7__supports_js__["a" /* createScopedLineTokens */])(lineTokens, column); return scopedLineTokens; }; // end onEnter LanguageConfigurationRegistryImpl.prototype.getBracketsSupport = function (languageId) { var value = this._getRichEditSupport(languageId); if (!value) { return null; } return value.brackets || null; }; return LanguageConfigurationRegistryImpl; }()); var LanguageConfigurationRegistry = new LanguageConfigurationRegistryImpl(); /***/ }), /***/ 1328: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return Viewport; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MinimapLinesRenderingData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ViewLineData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ViewLineRenderingData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return InlineDecoration; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ViewModelDecoration; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_strings_js__ = __webpack_require__(847); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var Viewport = /** @class */ (function () { function Viewport(top, left, width, height) { this.top = top | 0; this.left = left | 0; this.width = width | 0; this.height = height | 0; } return Viewport; }()); var MinimapLinesRenderingData = /** @class */ (function () { function MinimapLinesRenderingData(tabSize, data) { this.tabSize = tabSize; this.data = data; } return MinimapLinesRenderingData; }()); var ViewLineData = /** @class */ (function () { function ViewLineData(content, continuesWithWrappedLine, minColumn, maxColumn, tokens) { this.content = content; this.continuesWithWrappedLine = continuesWithWrappedLine; this.minColumn = minColumn; this.maxColumn = maxColumn; this.tokens = tokens; } return ViewLineData; }()); var ViewLineRenderingData = /** @class */ (function () { function ViewLineRenderingData(minColumn, maxColumn, content, continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, tokens, inlineDecorations, tabSize) { this.minColumn = minColumn; this.maxColumn = maxColumn; this.content = content; this.continuesWithWrappedLine = continuesWithWrappedLine; this.isBasicASCII = ViewLineRenderingData.isBasicASCII(content, mightContainNonBasicASCII); this.containsRTL = ViewLineRenderingData.containsRTL(content, this.isBasicASCII, mightContainRTL); this.tokens = tokens; this.inlineDecorations = inlineDecorations; this.tabSize = tabSize; } ViewLineRenderingData.isBasicASCII = function (lineContent, mightContainNonBasicASCII) { if (mightContainNonBasicASCII) { return __WEBPACK_IMPORTED_MODULE_0__base_common_strings_js__["q" /* isBasicASCII */](lineContent); } return true; }; ViewLineRenderingData.containsRTL = function (lineContent, isBasicASCII, mightContainRTL) { if (!isBasicASCII && mightContainRTL) { return __WEBPACK_IMPORTED_MODULE_0__base_common_strings_js__["f" /* containsRTL */](lineContent); } return false; }; return ViewLineRenderingData; }()); var InlineDecoration = /** @class */ (function () { function InlineDecoration(range, inlineClassName, type) { this.range = range; this.inlineClassName = inlineClassName; this.type = type; } return InlineDecoration; }()); var ViewModelDecoration = /** @class */ (function () { function ViewModelDecoration(range, options) { this.range = range; this.options = options; } return ViewModelDecoration; }()); /***/ }), /***/ 1329: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export Severity */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return INotificationService; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NoOpNotification; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_severity_js__ = __webpack_require__(1572); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__instantiation_common_instantiation_js__ = __webpack_require__(855); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var Severity = __WEBPACK_IMPORTED_MODULE_0__base_common_severity_js__["a" /* default */]; var INotificationService = Object(__WEBPACK_IMPORTED_MODULE_1__instantiation_common_instantiation_js__["c" /* createDecorator */])('notificationService'); var NoOpNotification = /** @class */ (function () { function NoOpNotification() { } return NoOpNotification; }()); /***/ }), /***/ 1330: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DynamicViewOverlay; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_viewModel_viewEventHandler_js__ = __webpack_require__(1398); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var DynamicViewOverlay = /** @class */ (function (_super) { __extends(DynamicViewOverlay, _super); function DynamicViewOverlay() { return _super !== null && _super.apply(this, arguments) || this; } return DynamicViewOverlay; }(__WEBPACK_IMPORTED_MODULE_0__common_viewModel_viewEventHandler_js__["a" /* ViewEventHandler */])); /***/ }), /***/ 1331: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return RGBA; }); /* unused harmony export HSLA */ /* unused harmony export HSVA */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Color; }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ function roundFloat(number, decimalPoints) { var decimal = Math.pow(10, decimalPoints); return Math.round(number * decimal) / decimal; } var RGBA = /** @class */ (function () { function RGBA(r, g, b, a) { if (a === void 0) { a = 1; } this.r = Math.min(255, Math.max(0, r)) | 0; this.g = Math.min(255, Math.max(0, g)) | 0; this.b = Math.min(255, Math.max(0, b)) | 0; this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); } RGBA.equals = function (a, b) { return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a; }; return RGBA; }()); var HSLA = /** @class */ (function () { function HSLA(h, s, l, a) { this.h = Math.max(Math.min(360, h), 0) | 0; this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); this.l = roundFloat(Math.max(Math.min(1, l), 0), 3); this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); } HSLA.equals = function (a, b) { return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a; }; /** * Converts an RGB color value to HSL. Conversion formula * adapted from http://en.wikipedia.org/wiki/HSL_color_space. * Assumes r, g, and b are contained in the set [0, 255] and * returns h in the set [0, 360], s, and l in the set [0, 1]. */ HSLA.fromRGBA = function (rgba) { var r = rgba.r / 255; var g = rgba.g / 255; var b = rgba.b / 255; var a = rgba.a; var max = Math.max(r, g, b); var min = Math.min(r, g, b); var h = 0; var s = 0; var l = (min + max) / 2; var chroma = max - min; if (chroma > 0) { s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1); switch (max) { case r: h = (g - b) / chroma + (g < b ? 6 : 0); break; case g: h = (b - r) / chroma + 2; break; case b: h = (r - g) / chroma + 4; break; } h *= 60; h = Math.round(h); } return new HSLA(h, s, l, a); }; HSLA._hue2rgb = function (p, q, t) { if (t < 0) { t += 1; } if (t > 1) { t -= 1; } if (t < 1 / 6) { return p + (q - p) * 6 * t; } if (t < 1 / 2) { return q; } if (t < 2 / 3) { return p + (q - p) * (2 / 3 - t) * 6; } return p; }; /** * Converts an HSL color value to RGB. Conversion formula * adapted from http://en.wikipedia.org/wiki/HSL_color_space. * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and * returns r, g, and b in the set [0, 255]. */ HSLA.toRGBA = function (hsla) { var h = hsla.h / 360; var s = hsla.s, l = hsla.l, a = hsla.a; var r, g, b; if (s === 0) { r = g = b = l; // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = HSLA._hue2rgb(p, q, h + 1 / 3); g = HSLA._hue2rgb(p, q, h); b = HSLA._hue2rgb(p, q, h - 1 / 3); } return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a); }; return HSLA; }()); var HSVA = /** @class */ (function () { function HSVA(h, s, v, a) { this.h = Math.max(Math.min(360, h), 0) | 0; this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); this.v = roundFloat(Math.max(Math.min(1, v), 0), 3); this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); } HSVA.equals = function (a, b) { return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a; }; // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm HSVA.fromRGBA = function (rgba) { var r = rgba.r / 255; var g = rgba.g / 255; var b = rgba.b / 255; var cmax = Math.max(r, g, b); var cmin = Math.min(r, g, b); var delta = cmax - cmin; var s = cmax === 0 ? 0 : (delta / cmax); var m; if (delta === 0) { m = 0; } else if (cmax === r) { m = ((((g - b) / delta) % 6) + 6) % 6; } else if (cmax === g) { m = ((b - r) / delta) + 2; } else { m = ((r - g) / delta) + 4; } return new HSVA(Math.round(m * 60), s, cmax, rgba.a); }; // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm HSVA.toRGBA = function (hsva) { var h = hsva.h, s = hsva.s, v = hsva.v, a = hsva.a; var c = v * s; var x = c * (1 - Math.abs((h / 60) % 2 - 1)); var m = v - c; var _a = [0, 0, 0], r = _a[0], g = _a[1], b = _a[2]; if (h < 60) { r = c; g = x; } else if (h < 120) { r = x; g = c; } else if (h < 180) { g = c; b = x; } else if (h < 240) { g = x; b = c; } else if (h < 300) { r = x; b = c; } else if (h < 360) { r = c; b = x; } r = Math.round((r + m) * 255); g = Math.round((g + m) * 255); b = Math.round((b + m) * 255); return new RGBA(r, g, b, a); }; return HSVA; }()); var Color = /** @class */ (function () { function Color(arg) { if (!arg) { throw new Error('Color needs a value'); } else if (arg instanceof RGBA) { this.rgba = arg; } else if (arg instanceof HSLA) { this._hsla = arg; this.rgba = HSLA.toRGBA(arg); } else if (arg instanceof HSVA) { this._hsva = arg; this.rgba = HSVA.toRGBA(arg); } else { throw new Error('Invalid color ctor argument'); } } Color.fromHex = function (hex) { return Color.Format.CSS.parseHex(hex) || Color.red; }; Object.defineProperty(Color.prototype, "hsla", { get: function () { if (this._hsla) { return this._hsla; } else { return HSLA.fromRGBA(this.rgba); } }, enumerable: true, configurable: true }); Object.defineProperty(Color.prototype, "hsva", { get: function () { if (this._hsva) { return this._hsva; } return HSVA.fromRGBA(this.rgba); }, enumerable: true, configurable: true }); Color.prototype.equals = function (other) { return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva); }; /** * http://www.w3.org/TR/WCAG20/#relativeluminancedef * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white. */ Color.prototype.getRelativeLuminance = function () { var R = Color._relativeLuminanceForComponent(this.rgba.r); var G = Color._relativeLuminanceForComponent(this.rgba.g); var B = Color._relativeLuminanceForComponent(this.rgba.b); var luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B; return roundFloat(luminance, 4); }; Color._relativeLuminanceForComponent = function (color) { var c = color / 255; return (c <= 0.03928) ? c / 12.92 : Math.pow(((c + 0.055) / 1.055), 2.4); }; /** * http://24ways.org/2010/calculating-color-contrast * Return 'true' if lighter color otherwise 'false' */ Color.prototype.isLighter = function () { var yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000; return yiq >= 128; }; Color.prototype.isLighterThan = function (another) { var lum1 = this.getRelativeLuminance(); var lum2 = another.getRelativeLuminance(); return lum1 > lum2; }; Color.prototype.isDarkerThan = function (another) { var lum1 = this.getRelativeLuminance(); var lum2 = another.getRelativeLuminance(); return lum1 < lum2; }; Color.prototype.lighten = function (factor) { return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a)); }; Color.prototype.darken = function (factor) { return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a)); }; Color.prototype.transparent = function (factor) { var _a = this.rgba, r = _a.r, g = _a.g, b = _a.b, a = _a.a; return new Color(new RGBA(r, g, b, a * factor)); }; Color.prototype.isTransparent = function () { return this.rgba.a === 0; }; Color.prototype.isOpaque = function () { return this.rgba.a === 1; }; Color.prototype.opposite = function () { return new Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); }; Color.prototype.toString = function () { return '' + Color.Format.CSS.format(this); }; Color.getLighterColor = function (of, relative, factor) { if (of.isLighterThan(relative)) { return of; } factor = factor ? factor : 0.5; var lum1 = of.getRelativeLuminance(); var lum2 = relative.getRelativeLuminance(); factor = factor * (lum2 - lum1) / lum2; return of.lighten(factor); }; Color.getDarkerColor = function (of, relative, factor) { if (of.isDarkerThan(relative)) { return of; } factor = factor ? factor : 0.5; var lum1 = of.getRelativeLuminance(); var lum2 = relative.getRelativeLuminance(); factor = factor * (lum1 - lum2) / lum1; return of.darken(factor); }; Color.white = new Color(new RGBA(255, 255, 255, 1)); Color.black = new Color(new RGBA(0, 0, 0, 1)); Color.red = new Color(new RGBA(255, 0, 0, 1)); Color.blue = new Color(new RGBA(0, 0, 255, 1)); Color.cyan = new Color(new RGBA(0, 255, 255, 1)); Color.lightgrey = new Color(new RGBA(211, 211, 211, 1)); Color.transparent = new Color(new RGBA(0, 0, 0, 0)); return Color; }()); (function (Color) { var Format; (function (Format) { var CSS; (function (CSS) { function formatRGB(color) { if (color.rgba.a === 1) { return "rgb(" + color.rgba.r + ", " + color.rgba.g + ", " + color.rgba.b + ")"; } return Color.Format.CSS.formatRGBA(color); } CSS.formatRGB = formatRGB; function formatRGBA(color) { return "rgba(" + color.rgba.r + ", " + color.rgba.g + ", " + color.rgba.b + ", " + +(color.rgba.a).toFixed(2) + ")"; } CSS.formatRGBA = formatRGBA; function formatHSL(color) { if (color.hsla.a === 1) { return "hsl(" + color.hsla.h + ", " + (color.hsla.s * 100).toFixed(2) + "%, " + (color.hsla.l * 100).toFixed(2) + "%)"; } return Color.Format.CSS.formatHSLA(color); } CSS.formatHSL = formatHSL; function formatHSLA(color) { return "hsla(" + color.hsla.h + ", " + (color.hsla.s * 100).toFixed(2) + "%, " + (color.hsla.l * 100).toFixed(2) + "%, " + color.hsla.a.toFixed(2) + ")"; } CSS.formatHSLA = formatHSLA; function _toTwoDigitHex(n) { var r = n.toString(16); return r.length !== 2 ? '0' + r : r; } /** * Formats the color as #RRGGBB */ function formatHex(color) { return "#" + _toTwoDigitHex(color.rgba.r) + _toTwoDigitHex(color.rgba.g) + _toTwoDigitHex(color.rgba.b); } CSS.formatHex = formatHex; /** * Formats the color as #RRGGBBAA * If 'compact' is set, colors without transparancy will be printed as #RRGGBB */ function formatHexA(color, compact) { if (compact === void 0) { compact = false; } if (compact && color.rgba.a === 1) { return Color.Format.CSS.formatHex(color); } return "#" + _toTwoDigitHex(color.rgba.r) + _toTwoDigitHex(color.rgba.g) + _toTwoDigitHex(color.rgba.b) + _toTwoDigitHex(Math.round(color.rgba.a * 255)); } CSS.formatHexA = formatHexA; /** * The default format will use HEX if opaque and RGBA otherwise. */ function format(color) { if (!color) { return null; } if (color.isOpaque()) { return Color.Format.CSS.formatHex(color); } return Color.Format.CSS.formatRGBA(color); } CSS.format = format; /** * Converts an Hex color value to a Color. * returns r, g, and b are contained in the set [0, 255] * @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA). */ function parseHex(hex) { if (!hex) { // Invalid color return null; } var length = hex.length; if (length === 0) { // Invalid color return null; } if (hex.charCodeAt(0) !== 35 /* Hash */) { // Does not begin with a # return null; } if (length === 7) { // #RRGGBB format var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); return new Color(new RGBA(r, g, b, 1)); } if (length === 9) { // #RRGGBBAA format var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); var a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8)); return new Color(new RGBA(r, g, b, a / 255)); } if (length === 4) { // #RGB format var r = _parseHexDigit(hex.charCodeAt(1)); var g = _parseHexDigit(hex.charCodeAt(2)); var b = _parseHexDigit(hex.charCodeAt(3)); return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b)); } if (length === 5) { // #RGBA format var r = _parseHexDigit(hex.charCodeAt(1)); var g = _parseHexDigit(hex.charCodeAt(2)); var b = _parseHexDigit(hex.charCodeAt(3)); var a = _parseHexDigit(hex.charCodeAt(4)); return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255)); } // Invalid color return null; } CSS.parseHex = parseHex; function _parseHexDigit(charCode) { switch (charCode) { case 48 /* Digit0 */: return 0; case 49 /* Digit1 */: return 1; case 50 /* Digit2 */: return 2; case 51 /* Digit3 */: return 3; case 52 /* Digit4 */: return 4; case 53 /* Digit5 */: return 5; case 54 /* Digit6 */: return 6; case 55 /* Digit7 */: return 7; case 56 /* Digit8 */: return 8; case 57 /* Digit9 */: return 9; case 97 /* a */: return 10; case 65 /* A */: return 10; case 98 /* b */: return 11; case 66 /* B */: return 11; case 99 /* c */: return 12; case 67 /* C */: return 12; case 100 /* d */: return 13; case 68 /* D */: return 13; case 101 /* e */: return 14; case 69 /* E */: return 14; case 102 /* f */: return 15; case 70 /* F */: return 15; } return 0; } })(CSS = Format.CSS || (Format.CSS = {})); })(Format = Color.Format || (Color.Format = {})); })(Color || (Color = {})); /***/ }), /***/ 1356: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return KeyCodeUtils; }); /* harmony export (immutable) */ __webpack_exports__["a"] = KeyChord; /* harmony export (immutable) */ __webpack_exports__["f"] = createKeybinding; /* unused harmony export createSimpleKeybinding */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return SimpleKeybinding; }); /* unused harmony export ChordKeybinding */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ResolvedKeybindingPart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ResolvedKeybinding; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__errors_js__ = __webpack_require__(956); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var KeyCodeStrMap = /** @class */ (function () { function KeyCodeStrMap() { this._keyCodeToStr = []; this._strToKeyCode = Object.create(null); } KeyCodeStrMap.prototype.define = function (keyCode, str) { this._keyCodeToStr[keyCode] = str; this._strToKeyCode[str.toLowerCase()] = keyCode; }; KeyCodeStrMap.prototype.keyCodeToStr = function (keyCode) { return this._keyCodeToStr[keyCode]; }; KeyCodeStrMap.prototype.strToKeyCode = function (str) { return this._strToKeyCode[str.toLowerCase()] || 0 /* Unknown */; }; return KeyCodeStrMap; }()); var uiMap = new KeyCodeStrMap(); var userSettingsUSMap = new KeyCodeStrMap(); var userSettingsGeneralMap = new KeyCodeStrMap(); (function () { function define(keyCode, uiLabel, usUserSettingsLabel, generalUserSettingsLabel) { if (usUserSettingsLabel === void 0) { usUserSettingsLabel = uiLabel; } if (generalUserSettingsLabel === void 0) { generalUserSettingsLabel = usUserSettingsLabel; } uiMap.define(keyCode, uiLabel); userSettingsUSMap.define(keyCode, usUserSettingsLabel); userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel); } define(0 /* Unknown */, 'unknown'); define(1 /* Backspace */, 'Backspace'); define(2 /* Tab */, 'Tab'); define(3 /* Enter */, 'Enter'); define(4 /* Shift */, 'Shift'); define(5 /* Ctrl */, 'Ctrl'); define(6 /* Alt */, 'Alt'); define(7 /* PauseBreak */, 'PauseBreak'); define(8 /* CapsLock */, 'CapsLock'); define(9 /* Escape */, 'Escape'); define(10 /* Space */, 'Space'); define(11 /* PageUp */, 'PageUp'); define(12 /* PageDown */, 'PageDown'); define(13 /* End */, 'End'); define(14 /* Home */, 'Home'); define(15 /* LeftArrow */, 'LeftArrow', 'Left'); define(16 /* UpArrow */, 'UpArrow', 'Up'); define(17 /* RightArrow */, 'RightArrow', 'Right'); define(18 /* DownArrow */, 'DownArrow', 'Down'); define(19 /* Insert */, 'Insert'); define(20 /* Delete */, 'Delete'); define(21 /* KEY_0 */, '0'); define(22 /* KEY_1 */, '1'); define(23 /* KEY_2 */, '2'); define(24 /* KEY_3 */, '3'); define(25 /* KEY_4 */, '4'); define(26 /* KEY_5 */, '5'); define(27 /* KEY_6 */, '6'); define(28 /* KEY_7 */, '7'); define(29 /* KEY_8 */, '8'); define(30 /* KEY_9 */, '9'); define(31 /* KEY_A */, 'A'); define(32 /* KEY_B */, 'B'); define(33 /* KEY_C */, 'C'); define(34 /* KEY_D */, 'D'); define(35 /* KEY_E */, 'E'); define(36 /* KEY_F */, 'F'); define(37 /* KEY_G */, 'G'); define(38 /* KEY_H */, 'H'); define(39 /* KEY_I */, 'I'); define(40 /* KEY_J */, 'J'); define(41 /* KEY_K */, 'K'); define(42 /* KEY_L */, 'L'); define(43 /* KEY_M */, 'M'); define(44 /* KEY_N */, 'N'); define(45 /* KEY_O */, 'O'); define(46 /* KEY_P */, 'P'); define(47 /* KEY_Q */, 'Q'); define(48 /* KEY_R */, 'R'); define(49 /* KEY_S */, 'S'); define(50 /* KEY_T */, 'T'); define(51 /* KEY_U */, 'U'); define(52 /* KEY_V */, 'V'); define(53 /* KEY_W */, 'W'); define(54 /* KEY_X */, 'X'); define(55 /* KEY_Y */, 'Y'); define(56 /* KEY_Z */, 'Z'); define(57 /* Meta */, 'Meta'); define(58 /* ContextMenu */, 'ContextMenu'); define(59 /* F1 */, 'F1'); define(60 /* F2 */, 'F2'); define(61 /* F3 */, 'F3'); define(62 /* F4 */, 'F4'); define(63 /* F5 */, 'F5'); define(64 /* F6 */, 'F6'); define(65 /* F7 */, 'F7'); define(66 /* F8 */, 'F8'); define(67 /* F9 */, 'F9'); define(68 /* F10 */, 'F10'); define(69 /* F11 */, 'F11'); define(70 /* F12 */, 'F12'); define(71 /* F13 */, 'F13'); define(72 /* F14 */, 'F14'); define(73 /* F15 */, 'F15'); define(74 /* F16 */, 'F16'); define(75 /* F17 */, 'F17'); define(76 /* F18 */, 'F18'); define(77 /* F19 */, 'F19'); define(78 /* NumLock */, 'NumLock'); define(79 /* ScrollLock */, 'ScrollLock'); define(80 /* US_SEMICOLON */, ';', ';', 'OEM_1'); define(81 /* US_EQUAL */, '=', '=', 'OEM_PLUS'); define(82 /* US_COMMA */, ',', ',', 'OEM_COMMA'); define(83 /* US_MINUS */, '-', '-', 'OEM_MINUS'); define(84 /* US_DOT */, '.', '.', 'OEM_PERIOD'); define(85 /* US_SLASH */, '/', '/', 'OEM_2'); define(86 /* US_BACKTICK */, '`', '`', 'OEM_3'); define(110 /* ABNT_C1 */, 'ABNT_C1'); define(111 /* ABNT_C2 */, 'ABNT_C2'); define(87 /* US_OPEN_SQUARE_BRACKET */, '[', '[', 'OEM_4'); define(88 /* US_BACKSLASH */, '\\', '\\', 'OEM_5'); define(89 /* US_CLOSE_SQUARE_BRACKET */, ']', ']', 'OEM_6'); define(90 /* US_QUOTE */, '\'', '\'', 'OEM_7'); define(91 /* OEM_8 */, 'OEM_8'); define(92 /* OEM_102 */, 'OEM_102'); define(93 /* NUMPAD_0 */, 'NumPad0'); define(94 /* NUMPAD_1 */, 'NumPad1'); define(95 /* NUMPAD_2 */, 'NumPad2'); define(96 /* NUMPAD_3 */, 'NumPad3'); define(97 /* NUMPAD_4 */, 'NumPad4'); define(98 /* NUMPAD_5 */, 'NumPad5'); define(99 /* NUMPAD_6 */, 'NumPad6'); define(100 /* NUMPAD_7 */, 'NumPad7'); define(101 /* NUMPAD_8 */, 'NumPad8'); define(102 /* NUMPAD_9 */, 'NumPad9'); define(103 /* NUMPAD_MULTIPLY */, 'NumPad_Multiply'); define(104 /* NUMPAD_ADD */, 'NumPad_Add'); define(105 /* NUMPAD_SEPARATOR */, 'NumPad_Separator'); define(106 /* NUMPAD_SUBTRACT */, 'NumPad_Subtract'); define(107 /* NUMPAD_DECIMAL */, 'NumPad_Decimal'); define(108 /* NUMPAD_DIVIDE */, 'NumPad_Divide'); })(); var KeyCodeUtils; (function (KeyCodeUtils) { function toString(keyCode) { return uiMap.keyCodeToStr(keyCode); } KeyCodeUtils.toString = toString; function fromString(key) { return uiMap.strToKeyCode(key); } KeyCodeUtils.fromString = fromString; function toUserSettingsUS(keyCode) { return userSettingsUSMap.keyCodeToStr(keyCode); } KeyCodeUtils.toUserSettingsUS = toUserSettingsUS; function toUserSettingsGeneral(keyCode) { return userSettingsGeneralMap.keyCodeToStr(keyCode); } KeyCodeUtils.toUserSettingsGeneral = toUserSettingsGeneral; function fromUserSettings(key) { return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key); } KeyCodeUtils.fromUserSettings = fromUserSettings; })(KeyCodeUtils || (KeyCodeUtils = {})); function KeyChord(firstPart, secondPart) { var chordPart = ((secondPart & 0x0000FFFF) << 16) >>> 0; return (firstPart | chordPart) >>> 0; } function createKeybinding(keybinding, OS) { if (keybinding === 0) { return null; } var firstPart = (keybinding & 0x0000FFFF) >>> 0; var chordPart = (keybinding & 0xFFFF0000) >>> 16; if (chordPart !== 0) { return new ChordKeybinding([ createSimpleKeybinding(firstPart, OS), createSimpleKeybinding(chordPart, OS) ]); } return new ChordKeybinding([createSimpleKeybinding(firstPart, OS)]); } function createSimpleKeybinding(keybinding, OS) { var ctrlCmd = (keybinding & 2048 /* CtrlCmd */ ? true : false); var winCtrl = (keybinding & 256 /* WinCtrl */ ? true : false); var ctrlKey = (OS === 2 /* Macintosh */ ? winCtrl : ctrlCmd); var shiftKey = (keybinding & 1024 /* Shift */ ? true : false); var altKey = (keybinding & 512 /* Alt */ ? true : false); var metaKey = (OS === 2 /* Macintosh */ ? ctrlCmd : winCtrl); var keyCode = (keybinding & 255 /* KeyCode */); return new SimpleKeybinding(ctrlKey, shiftKey, altKey, metaKey, keyCode); } var SimpleKeybinding = /** @class */ (function () { function SimpleKeybinding(ctrlKey, shiftKey, altKey, metaKey, keyCode) { this.ctrlKey = ctrlKey; this.shiftKey = shiftKey; this.altKey = altKey; this.metaKey = metaKey; this.keyCode = keyCode; } SimpleKeybinding.prototype.equals = function (other) { return (this.ctrlKey === other.ctrlKey && this.shiftKey === other.shiftKey && this.altKey === other.altKey && this.metaKey === other.metaKey && this.keyCode === other.keyCode); }; SimpleKeybinding.prototype.isModifierKey = function () { return (this.keyCode === 0 /* Unknown */ || this.keyCode === 5 /* Ctrl */ || this.keyCode === 57 /* Meta */ || this.keyCode === 6 /* Alt */ || this.keyCode === 4 /* Shift */); }; SimpleKeybinding.prototype.toChord = function () { return new ChordKeybinding([this]); }; /** * Does this keybinding refer to the key code of a modifier and it also has the modifier flag? */ SimpleKeybinding.prototype.isDuplicateModifierCase = function () { return ((this.ctrlKey && this.keyCode === 5 /* Ctrl */) || (this.shiftKey && this.keyCode === 4 /* Shift */) || (this.altKey && this.keyCode === 6 /* Alt */) || (this.metaKey && this.keyCode === 57 /* Meta */)); }; return SimpleKeybinding; }()); var ChordKeybinding = /** @class */ (function () { function ChordKeybinding(parts) { if (parts.length === 0) { throw Object(__WEBPACK_IMPORTED_MODULE_0__errors_js__["b" /* illegalArgument */])("parts"); } this.parts = parts; } ChordKeybinding.prototype.equals = function (other) { if (other === null) { return false; } if (this.parts.length !== other.parts.length) { return false; } for (var i = 0; i < this.parts.length; i++) { if (!this.parts[i].equals(other.parts[i])) { return false; } } return true; }; return ChordKeybinding; }()); var ResolvedKeybindingPart = /** @class */ (function () { function ResolvedKeybindingPart(ctrlKey, shiftKey, altKey, metaKey, kbLabel, kbAriaLabel) { this.ctrlKey = ctrlKey; this.shiftKey = shiftKey; this.altKey = altKey; this.metaKey = metaKey; this.keyLabel = kbLabel; this.keyAriaLabel = kbAriaLabel; } return ResolvedKeybindingPart; }()); /** * A resolved keybinding. Can be a simple keybinding or a chord keybinding. */ var ResolvedKeybinding = /** @class */ (function () { function ResolvedKeybinding() { } return ResolvedKeybinding; }()); /***/ }), /***/ 1357: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return domEvent; }); /* unused harmony export stop */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_event_js__ = __webpack_require__(833); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var domEvent = function (element, type, useCapture) { var fn = function (e) { return emitter.fire(e); }; var emitter = new __WEBPACK_IMPORTED_MODULE_0__common_event_js__["a" /* Emitter */]({ onFirstListenerAdd: function () { element.addEventListener(type, fn, useCapture); }, onLastListenerRemove: function () { element.removeEventListener(type, fn, useCapture); } }); return emitter.event; }; function stop(event) { return __WEBPACK_IMPORTED_MODULE_0__common_event_js__["b" /* Event */].map(event, function (e) { e.preventDefault(); e.stopPropagation(); return e; }); } /***/ }), /***/ 1358: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Schemas; }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var Schemas; (function (Schemas) { /** * A schema that is used for models that exist in memory * only and that have no correspondence on a server or such. */ Schemas.inMemory = 'inmemory'; /** * A schema that is used for setting files */ Schemas.vscode = 'vscode'; /** * A schema that is used for internal private files */ Schemas.internal = 'private'; /** * A walk-through document. */ Schemas.walkThrough = 'walkThrough'; /** * An embedded code snippet. */ Schemas.walkThroughSnippet = 'walkThroughSnippet'; Schemas.http = 'http'; Schemas.https = 'https'; Schemas.file = 'file'; Schemas.mailto = 'mailto'; Schemas.untitled = 'untitled'; Schemas.data = 'data'; Schemas.command = 'command'; })(Schemas || (Schemas = {})); /***/ }), /***/ 1359: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ViewConfigurationChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ViewCursorStateChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ViewDecorationsChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ViewFlushedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return ViewFocusChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return ViewLineMappingChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return ViewLinesChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return ViewLinesDeletedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return ViewLinesInsertedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return ViewRevealRangeRequestEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return ViewScrollChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return ViewTokensChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return ViewThemeChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return ViewTokensColorsChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return ViewZonesChangedEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return ViewLanguageConfigurationEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ViewEventEmitter; }); /* unused harmony export ViewEventsCollector */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__ = __webpack_require__(956); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base_common_lifecycle_js__ = __webpack_require__(825); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var ViewConfigurationChangedEvent = /** @class */ (function () { function ViewConfigurationChangedEvent(source) { this.type = 1 /* ViewConfigurationChanged */; this.canUseLayerHinting = source.canUseLayerHinting; this.pixelRatio = source.pixelRatio; this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight; this.readOnly = source.readOnly; this.accessibilitySupport = source.accessibilitySupport; this.emptySelectionClipboard = source.emptySelectionClipboard; this.copyWithSyntaxHighlighting = source.copyWithSyntaxHighlighting; this.layoutInfo = source.layoutInfo; this.fontInfo = source.fontInfo; this.viewInfo = source.viewInfo; this.wrappingInfo = source.wrappingInfo; } return ViewConfigurationChangedEvent; }()); var ViewCursorStateChangedEvent = /** @class */ (function () { function ViewCursorStateChangedEvent(selections) { this.type = 2 /* ViewCursorStateChanged */; this.selections = selections; } return ViewCursorStateChangedEvent; }()); var ViewDecorationsChangedEvent = /** @class */ (function () { function ViewDecorationsChangedEvent() { this.type = 3 /* ViewDecorationsChanged */; // Nothing to do } return ViewDecorationsChangedEvent; }()); var ViewFlushedEvent = /** @class */ (function () { function ViewFlushedEvent() { this.type = 4 /* ViewFlushed */; // Nothing to do } return ViewFlushedEvent; }()); var ViewFocusChangedEvent = /** @class */ (function () { function ViewFocusChangedEvent(isFocused) { this.type = 5 /* ViewFocusChanged */; this.isFocused = isFocused; } return ViewFocusChangedEvent; }()); var ViewLineMappingChangedEvent = /** @class */ (function () { function ViewLineMappingChangedEvent() { this.type = 6 /* ViewLineMappingChanged */; // Nothing to do } return ViewLineMappingChangedEvent; }()); var ViewLinesChangedEvent = /** @class */ (function () { function ViewLinesChangedEvent(fromLineNumber, toLineNumber) { this.type = 7 /* ViewLinesChanged */; this.fromLineNumber = fromLineNumber; this.toLineNumber = toLineNumber; } return ViewLinesChangedEvent; }()); var ViewLinesDeletedEvent = /** @class */ (function () { function ViewLinesDeletedEvent(fromLineNumber, toLineNumber) { this.type = 8 /* ViewLinesDeleted */; this.fromLineNumber = fromLineNumber; this.toLineNumber = toLineNumber; } return ViewLinesDeletedEvent; }()); var ViewLinesInsertedEvent = /** @class */ (function () { function ViewLinesInsertedEvent(fromLineNumber, toLineNumber) { this.type = 9 /* ViewLinesInserted */; this.fromLineNumber = fromLineNumber; this.toLineNumber = toLineNumber; } return ViewLinesInsertedEvent; }()); var ViewRevealRangeRequestEvent = /** @class */ (function () { function ViewRevealRangeRequestEvent(range, verticalType, revealHorizontal, scrollType) { this.type = 10 /* ViewRevealRangeRequest */; this.range = range; this.verticalType = verticalType; this.revealHorizontal = revealHorizontal; this.scrollType = scrollType; } return ViewRevealRangeRequestEvent; }()); var ViewScrollChangedEvent = /** @class */ (function () { function ViewScrollChangedEvent(source) { this.type = 11 /* ViewScrollChanged */; this.scrollWidth = source.scrollWidth; this.scrollLeft = source.scrollLeft; this.scrollHeight = source.scrollHeight; this.scrollTop = source.scrollTop; this.scrollWidthChanged = source.scrollWidthChanged; this.scrollLeftChanged = source.scrollLeftChanged; this.scrollHeightChanged = source.scrollHeightChanged; this.scrollTopChanged = source.scrollTopChanged; } return ViewScrollChangedEvent; }()); var ViewTokensChangedEvent = /** @class */ (function () { function ViewTokensChangedEvent(ranges) { this.type = 12 /* ViewTokensChanged */; this.ranges = ranges; } return ViewTokensChangedEvent; }()); var ViewThemeChangedEvent = /** @class */ (function () { function ViewThemeChangedEvent() { this.type = 15 /* ViewThemeChanged */; } return ViewThemeChangedEvent; }()); var ViewTokensColorsChangedEvent = /** @class */ (function () { function ViewTokensColorsChangedEvent() { this.type = 13 /* ViewTokensColorsChanged */; // Nothing to do } return ViewTokensColorsChangedEvent; }()); var ViewZonesChangedEvent = /** @class */ (function () { function ViewZonesChangedEvent() { this.type = 14 /* ViewZonesChanged */; // Nothing to do } return ViewZonesChangedEvent; }()); var ViewLanguageConfigurationEvent = /** @class */ (function () { function ViewLanguageConfigurationEvent() { this.type = 16 /* ViewLanguageConfigurationChanged */; } return ViewLanguageConfigurationEvent; }()); var ViewEventEmitter = /** @class */ (function (_super) { __extends(ViewEventEmitter, _super); function ViewEventEmitter() { var _this = _super.call(this) || this; _this._listeners = []; _this._collector = null; _this._collectorCnt = 0; return _this; } ViewEventEmitter.prototype.dispose = function () { this._listeners = []; _super.prototype.dispose.call(this); }; ViewEventEmitter.prototype._beginEmit = function () { this._collectorCnt++; if (this._collectorCnt === 1) { this._collector = new ViewEventsCollector(); } return this._collector; }; ViewEventEmitter.prototype._endEmit = function () { this._collectorCnt--; if (this._collectorCnt === 0) { var events = this._collector.finalize(); this._collector = null; if (events.length > 0) { this._emit(events); } } }; ViewEventEmitter.prototype._emit = function (events) { var listeners = this._listeners.slice(0); for (var i = 0, len = listeners.length; i < len; i++) { safeInvokeListener(listeners[i], events); } }; ViewEventEmitter.prototype.addEventListener = function (listener) { var _this = this; this._listeners.push(listener); return Object(__WEBPACK_IMPORTED_MODULE_1__base_common_lifecycle_js__["e" /* toDisposable */])(function () { var listeners = _this._listeners; for (var i = 0, len = listeners.length; i < len; i++) { if (listeners[i] === listener) { listeners.splice(i, 1); break; } } }); }; return ViewEventEmitter; }(__WEBPACK_IMPORTED_MODULE_1__base_common_lifecycle_js__["a" /* Disposable */])); var ViewEventsCollector = /** @class */ (function () { function ViewEventsCollector() { this._eventsLen = 0; this._events = []; this._eventsLen = 0; } ViewEventsCollector.prototype.emit = function (event) { this._events[this._eventsLen++] = event; }; ViewEventsCollector.prototype.finalize = function () { var result = this._events; this._events = []; return result; }; return ViewEventsCollector; }()); function safeInvokeListener(listener, events) { try { listener(events); } catch (e) { __WEBPACK_IMPORTED_MODULE_0__base_common_errors_js__["e" /* onUnexpectedError */](e); } } /***/ }), /***/ 1387: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a